【发布时间】:2014-07-09 22:34:15
【问题描述】:
我有一个可滚动的div,其中包含一些img 元素。我为图像添加了width 和height 的悬停效果。它工作正常,但图像卡在#scrollerdiv。我希望图像在鼠标悬停时从滚动器div 中退出。我怎样才能做到这一点 ?
CSS:
#scroller {
width:100%;
border:1px solid black;
white-space:nowrap;
height:130px;
display:inline-block;
overflow-x:scroll;
overflow-y:hidden;
}
img {
width:128px;
height:128px;
}
img:hover {
width : 192px;
height:192px;
}
HTML:
<div id="scroller">
<img/>
<img/>
<img/>
<img/> ...and some more images
</div>
我没有尝试任何东西,因为我不知道。
【问题讨论】:
-
尝试溢出:#scroller 可见?