我正在尝试对悬停时的背景图像进行过渡效果。 目前这是我的代码:
HTML
<div class="item-one"></div>
CSS
->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%;
}
但是这对我不起作用,在不同的浏览器中测试过。其他转换,如背景颜色,按预期工作。这个属性上有任何限制吗?