所以我有一些图像,我正在平滑地放大鼠标.它看起来很棒,但我注意到它附近的其他图像在调整大小时会移动以容纳更多或更少的空间.我希望他们留在原地.这是代码: img{width:130;height:
img { width:130; height:130; margin:15px; background-color:transparent; background-size:100%; -webkit-transition: all 1s ease; -o-transition: all 1s ease; -moz-transition: all 1s ease; } img:hover { width:150; height:150; margin-left: 0px; margin-right:0px; margin-top:0px; }每个图像都应放置在任何内联块容器中,该容器具有静态宽度和高度,以便图像向上和向下滚动.这个容器的CSS:
.image_container { width: 130px; height: 145px;/* reserved space for image to scroll up */ display: inline-block; }