我试图在悬停时在我的背景图像上放置一个过渡。到目前为止,这是我的代码:
HTML
<div class="item-one"></div>
CSS
.item-one {
height: 345px;
width: 256px;
background: url('http://placehold.it/256x345') scroll no-repeat center center;
background-size: cover;
-webkit-transition: background-size 1500ms linear;
-moz-transition: background-size 1500 linear;
-o-transition: background-size 1500 linear
-ms-transition: background-size 1500ms linear;
transition: background-size 1500ms linear;
}
.item-one:hover {
background-size: 150%;
}
但这对我不起作用,在不同的浏览器中测试过。背景颜色等其他转换按预期工作。此属性的转换是否有任何限制?