此动画http://jsfiddle.net/ts9AG/无法使用(最新版本)Firefox。但是在Firefox 26中可以使用。我不知道为什么它不起作用。它仅使用边框宽度&背景颜色。
.loader.pulse {
width: 40px;
height: 40px;
border: 20px solid red;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
border-radius: 50%;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
animation: Loader 1.3s linear 0 infinite;
-moz-animation: Loader 1.3s linear 0 infinite;
-webkit-animation: Loader 1.3s linear 0 infinite;
-o-animation: Loader 1.3s linear 0 infinite;
}
@-webkit-keyframes Loader {
0% {
background: #ddd;
border: 20px solid red;
}
49.9% {
background: #ddd;
border: 0px solid red;
}
50% {
background: red;
border: 20px solid #ddd;
}
100%{
background: red;
border: 0px solid #ddd;
}
}
@-moz-keyframes Loader {
0% {
background: #ddd;
border: 20px solid red;
}
49.9% {
background: #ddd;
border: 0px solid red;
}
50% {
background: red;
border: 20px solid #ddd;
}
100%{
background: red;
border: 0px solid #ddd;
}
}
@keyframes Loader {
0% {
background: #ddd;
border: 20px solid red;
}
49.9% {
background: #ddd;
border: 0px solid red;
}
50% {
background: red;
border: 20px solid #ddd;
}
100%{
background: red;
border: 0px solid #ddd;
}
}
答案 0 :(得分:1)
Firefox 26似乎将0
中的animation: Loader 1.3s linear 0 infinite
解释为时间值,即使它不应该。如果您更改为0s
,它应该有效。 http://jsfiddle.net/ts9AG/1/
-moz-animation: Loader 1.3s linear 0s infinite;
-webkit-animation: Loader 1.3s linear 0s infinite;
-o-animation: Loader 1.3s linear 0s infinite;
animation: Loader 1.3s linear 0s infinite;