我一直试图在IE中为背景设置动画,但图像仍然存在。它适用于Chrome和Firefox,但不适用于IE。我尝试过像Rare IE10 bug: CSS animation of background-position fails with multiple backgrounds and percentage
这样的类似设置它可以在那里工作但不能用我的代码。有谁知道IE / Edge不支持的是什么?搜索参考页面让我无处可去。代码
@-webkit-keyframes move {
0% { background-size: 310px 400px; }
40% { background-size: 1450px 1900px; }
40% { background-position: -50px -1050px; }
60% { background-size: 1450px 1900px; }
60% { background-position: -50px -1350px; }
100% { background-size: 310px 400px; }
}
@keyframes move {
0% { background-size: 310px 400px; }
40% { background-size: 1450px 1900px; }
40% { background-position: -50px -1050px; }
60% { background-size: 1450px 1900px; }
60% { background-position: -50px -1350px; }
100% { background-size: 310px 400px; }
}
div {
width: 310px;
height: 400px;
background-image: url('2024x3008image.png');
background-size: 310px 400px;
background-position: top left;
-webkit-animation: move 10s infinite;
animation: move 10s infinite;
}