我正在尝试创建一个初学者的CSS3动画。在Chrome、Opera和Safari中可以运行,但在Internet Explorer(11)和Firefox(34.0)中无法运行。
我使用了-moz-前缀,但它没有起作用...我不知道为什么。
我使用了-moz-前缀,但它没有起作用...我不知道为什么。
body{
width:100%;
}
#center{
width:900px;
margin:0 auto;
height:800px;
display:block;
}
#center .box{
width:100px;
height:100px;
background-color:black;
margin:0 auto;
-webkit-animation: myfirst 5s; /* Chrome, Safari, Opera */
animation: myfirst 5s; /*Explorer*/
-moz-animation: myfirst 5s; /*Mozilla*/
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
animation-iteration-count: infinite;
}
@-webkit-keyframes myfirst{
from{backgrond:black;}
to{background:yellow;}
}
@-moz-keyframes myfirst{
from{background:black;}
to{background: :yellow;}
}
@keyframes myfirst {
from{background:black;}
to{background: :yellow;}
}
:
)http://jsfiddle.net/webtiki/5a5e48gq/4/ - web-tiki