从这里https://codepen.io/dragoeco/pen/ibrzKCSS背景放大效应
有效使用以下缩放需要得到一个背景图像淡入与变焦效果悬停喜欢这里的一个http://fantasy.co/work保持前景标志相同的一些援助。
.image-box{
width:300px;
overflow:hidden;
}
.image {
\t width:300px;
height:200px;
\t background: url("http://lorempixel.com/300/200");
\t background-position:center;
\t transition: all 1s ease;
-moz-transition: all 1s ease;
-ms-transition: all 1s ease;
-webkit-transition: all 1s ease;
-o-transition: all 1s ease;
}
.image:hover {
transform: scale(1.5);
-moz-transform: scale(1.5);
-webkit-transform: scale(1.5);
-o-transform: scale(1.5);
-ms-transform: scale(1.5); /* IE 9 */
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=1.5, M12=0, M21=0, M22=1.5, SizingMethod='auto expand')"; /* IE8 */
filter: progid:DXImageTransform.Microsoft.Matrix(M11=1.5, M12=0, M21=0, M22=1.5, SizingMethod='auto expand'); /* IE6 and 7 */
}
<div class="image-box">
<div class="image">
</div>
</div>
这有助于很多,是正确的!谢谢一堆! @kukkuz – user1749105