如何使图像不会移动而不是鼠标移动
问题描述:
在以内联方式显示并由图像形成的列表中,如何使图像不是鼠标移动而是移动?当我将鼠标放在图像上时,两侧的图像也会移动。我怎么能让他们不动? (我设置了图像的CSS设置,如何使图像不会移动而不是鼠标移动
img {
width:42px;
height:60px;
}
img:hover {
width:62px;
height:80px;
所以,当鼠标放完了它只是调整大小。)
答
也许这就是你想要的?
img:hover {
-webkit-transform: scale(1.30);
-moz-transform: scale(1.30);
-o-transform: scale(1.30);
transform: scale(1.30);
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
z-index: 2;
}
所以,你想要的形象扩大和重叠其他图像onHover选项? – Grice 2014-10-17 13:11:22
不,图像onhover必须越过 – DKim 2014-10-17 13:13:21
旁边的图像这就是重叠意味着什么。看看[CSS定位](http://www.w3schools.com/css/css_positioning.asp),特别是z-index。 – Grice 2014-10-17 13:15:21