当我应用变换比例时,“z-index 已更改”如何?我错过了什么?玩 transform 有什么“技巧”吗?
.thumb > a .img-cover{
-webkit-transition: all 1.2s ease-out;border-radius:5px;
-webkit-transform: scale(1);
}
.img-cover{
position:relative;
overflow:hidden;
}
.img-cover:before{
position:absolute;
top:0;left:0;right:0;bottom:0;
content:"";
box-shadow: inset 0px 0 100px #f0f;}
.thumb > a:hover img {
-webkit-transform: scale(1.1);
}
HTML
<div class="container">
<article class="thumb">
<a href="#">
<div class="img-cover"><img src="http://placekitten.com/300/120"/></div>
<span>thumb-desc</span>
</a>
</article>
</div>