我在CSS中制作关键帧动画。由于支持-webkit语法,动画在Chrome中似乎运行良好。CSS3动画中的firefox背景图片
@-webkit-keyframes title_toggle
{
from { background-image:url(images/title.png); }
75%{ background-image:url(images/title_hover.png); }
to { background-image:url(images/title.png); }
}
我尝试下面的代码的Firefox,但它不工作
@-moz-keyframes title_toggle {
from { background-image:url(images/title.png); }
75%{ background-image:url(images/title_hover.png); }
to { background-image:url(images/title.png); }
}
请让我知道我会在FF这项工作。
这是CSS的一部分。
@-moz-keyframes title_toggle {
from { background-image:url(images/title.png); }
75%{ background-image:url(images/title_hover.png); }
to { background-image:url(images/title.png); }
}
.title{
width:40%;
height: 30%;
position: absolute;
top: 10%;
left: 5%;
background-size: 100% 100%;
background-repeat:no-repeat;
-webkit-animation-name: title_toggle;
-webkit-animation-duration:5s;
-webkit-animation-iteration-count:infinite;
background-size: 100% 100%;
-moz-animation-name: title_toggle;
-moz-animation-duration:5s;
-moz-animation-iteration-count:infinite;
}
这是HTML
<div class="title"></div>
您正在测试哪个版本的Firefox? –
15.0.1的东西!我昨天刚刚下载了它... –
这应该工作,语法是完美的..你确定它失败了吗? –