-moz-transition在我的CSS中不起作用

时间:2012-10-11 19:51:23

标签: html css css3 css-transitions

  

可能重复:
  CSS keyframes only works in Chrome

我的网站使用css过渡在三个图标(Facebook,Twitter,电子邮件)上淡入新图像。转换适用于Chrome,但不适用于Firefox。这是css snipper:

.link-button > div{height:79px; width:79px; display:inline-block; zoom: 1; *display:inline; 
transition: 0.5s;
-moz-transition: 0.5s;
-webkit-transition: 0.5s;
-o-transition: 0.5s;}

.link-button .facebook{background:url(../img/bt_facebook.png) center center no-repeat transparent;}
.link-button .facebook:hover{background-image:url(../img/bt_facebook_over.png);}
.link-button .twitter{background:url(../img/bt_twitter.png) center center no-repeat transparent;}
.link-button .twitter:hover{background-image:url(../img/bt_twitter_over.png);}
.link-button .email{background:url(../img/bt_email.png) center center no-repeat transparent;}
.link-button .email:hover{background-image:url(../img/bt_email_over.png);}

我假设我的错误直接与-moz-transition有关,因为:hover状态有效,但不是转换。我已经复制了w3学校的转换代码,所以我知道这不是错误的,但是我的Firefox正确地触发了互联网上发现的css转换,所以我知道这不是我的浏览器有问题。它必须是我忽略的基本内容。

有什么想法吗?

1 个答案:

答案 0 :(得分:2)

CSS3 specification表示background-image无法设置动画。 Chrome中的background-image转换是非标准的。