我遇到一个问题,即在css中使用@keyframes并在css3验证中检查它是否显示错误"Sorry, the at-rule @-webkit-keyframes is not implemented"
。我想我是否需要像css一样添加pre声明。因为我是新手使用关键帧创建动画。有谁可以请我提供详细信息?
我的代码是,
@-webkit-keyframes roll{
0% {-webkit-transform: translateX(500px) rotate(360deg);}
100% {-webkit-transform: translateX(0px) rotate(0deg);}
}
@-moz-keyframes roll{
0% {-moz-transform: translateX(500px) rotate(360deg); opacity: 0;}
100% {-moz-transform: translateX(0px) rotate(0deg); opacity: 1;}
}
@-o-keyframes roll{
0% {-o-transform: translateX(500px) rotate(360deg); opacity: 0;}
100% {-o-transform: translateX(0px) rotate(0deg); opacity: 1;}
}
@-ms-keyframes roll{
0% {-ms-transform: translateX(500px) rotate(360deg); opacity: 0;}
100% {-ms-transform: translateX(0px) rotate(0deg); opacity: 1;}
}
@keyframes roll{
0% {transform: translateX(500px) rotate(360deg); opacity: 0;}
100% {transform: translateX(0px) rotate(0deg); opacity: 1;}
}
@-webkit-keyframes moveUp{
0% {-webkit-transform: translateY(40px);}
100% {-webkit-transform: translateY(0px);}
}
@-moz-keyframes moveUp{
0% {-moz-transform: translateY(40px);}
100% {-moz-transform: translateY(0px);}
}
@-o-keyframes moveUp{
0% {-o-transform: translateY(40px);}
100% {-o-transform: translateY(0px);}
}
@-ms-keyframes moveUp{
0% {-ms-transform: translateY(40px);}
100% {-ms-transform: translateY(0px);}
}
@keyframes moveUp{
0% {transform: translateY(40px);}
100% {transform: translateY(0px);}
}