繁体   English   中英

将鼠标悬停在图像和影像的其余部分将出现,但其出CSS范围

[英]Hover over image and the rest of the image will appear but its out of css scope

我有以下代码http://jsfiddle.net/tbedf/5/ ,它可以工作。但是我想知道是否可以做一些事情,当将鼠标悬停在图片上时,如果图片显示为完整大小,则完整图片会出现在顶部而不是将图像完全向下推。

li { float:left; height:100px; overflow:hidden; margin:10px; }
li:hover { height:auto; }

预先谢谢您,如果您不清楚,请告诉我。

您可以使用以下CSS:

li {float:left; height:100px;  position:relative; overflow:hidden; margin:10px; }
img {position: relative; height:auto; left:0px; top:0;}
li:hover { overflow:visible; z-index:99;  }

工作演示

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM