我有一个背景图片动画可以在Chrome中运行,但在Firefox和IE中没有。你知道为什么吗?
我的CSS看起来像
#banner {
background-attachment: fixed;
background-color: #666;
background-image: url("../images/banner-1.jpg");
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
animation-name: banner;
animation-duration: 15s;
animation-iteration-count: infinite;
-webkit-animation-name: banner;
-webkit-animation-duration: 20s;
-webkit-animation-iteration-count: infinite;
-moz-animation-name: banner;
-moz-animation-duration: 20s;
-moz-animation-iteration-count: infinite;
}
@keyframes banner {
0% { background-image: url(../images/banner-1.jpg); }
33% { background-image: url(../images/banner-2.jpg); }
60% { background-image: url(../images/banner-2.jpg); }
93% { background-image: url(../images/banner-3.jpg); }
}
@-moz-keyframes banner {
0% { background-image: url(../images/banner-1.jpg); }
33% { background-image: url(../images/banner-2.jpg); }
60% { background-image: url(../images/banner-2.jpg); }
93% { background-image: url(../images/banner-3.jpg); }
}
@-webkit-keyframes banner {
0% { background-image: url("../images/banner-1.jpg"); }
33% { background-image: url("../images/banner-2.jpg"); }
60% { background-image: url("../images/banner-2.jpg"); }
93% { background-image: url("../images/banner-3.jpg"); }
}
HTML部分是一个简单的内容