jjzjj

itemsContainer

全部标签

javascript - 循环中几个元素的 JS ArrowDown addEventListener(演示)

键盘ArrowDown事件有以下监听器(它的键码是40):window.onload=function(){varitemsContainer=document.getElementById('cities-drop');document.addEventListener('keyup',function(event){if(event.keyCode==40&&itemsContainer.style.display=='block'){event.preventDefault();for(vari=0;i在这种情况下,悬停跳转到列表中的最后一个元素,在按下ArrowDown之后。如

html - 在图像悬停时显示播放图标

目标:当我将鼠标悬停在“元素”图像上时,我希望“播放”图像出现在“元素”图像div的中心。我做了以下操作:play.img与itemImage.img重叠HTML:CSS.itemsContainer{float:left;width:300px;height:300px;margin-left:2px;}.itemsContainerimg{width:300px;height:175px;margin-bottom:-115px;z-index:-1;}.playimg{position:relative;width:50px;height:50px;z-index:100;mar

html - 在图像悬停时显示播放图标

目标:当我将鼠标悬停在“元素”图像上时,我希望“播放”图像出现在“元素”图像div的中心。我做了以下操作:play.img与itemImage.img重叠HTML:CSS.itemsContainer{float:left;width:300px;height:300px;margin-left:2px;}.itemsContainerimg{width:300px;height:175px;margin-bottom:-115px;z-index:-1;}.playimg{position:relative;width:50px;height:50px;z-index:100;mar