这是我的代码:
/* Tile colour rotation */
/*tile 1 */
@-webkit-keyframes bwe1 {
0% {background-color: #39f;}
15% {background-color: #8bc5d1;}
30% {background-color: #f8cb4a;}
45% {background-color: #95b850;}
60% {background-color: #944893;}
75% {background-color: #c71f00;}
90% {background-color: #bdb280;}
100% {background-color: #39f;}
}
@-moz-keyframes bwe1 {
0% {background-color: #39f;}
15% {background-color: #8bc5d1;}
30% {background-color: #f8cb4a;}
45% {background-color: #95b850;}
60% {background-color: #944893;}
75% {background-color: #c71f00;}
90% {background-color: #bdb280;}
100% {background-color: #39f;}
}
/* Colour changing tiles */
.metro-layout .cycle1 {-webkit-animation: bwe1 20s infinite alternate linear; -moz-animation: bwe1 20s infinite alternate linear; }
这是我用来定义颜色旋转动画的两段代码,但它在 IE10 中不起作用。然而,它在 Firefox、Safari 和 Chrome 中工作......
求助!
最佳答案
你还应该定义
-ms-animation: ...
和
@-ms-keyframes bwe1 { ... }
因为 -webkit-
和 -moz-
是供应商特定的前缀,IE
会忽略它。
请注意,您还应该为较新的浏览器(如最新的 Firefox 版本)定义代码的无前缀版本(animation
、@keyframes
)。
关于css - 为什么我的 CSS 颜色变换在 IE10 中不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19514213/