【发布时间】:2012-07-11 19:27:01
【问题描述】:
可能重复:
CSS3 transition of background-image for Firefox not working
第一篇文章在这里。我进行了研究,似乎已经接近找到答案,但也许我只是感到沮丧。
我无法让背景图像的 CSS3 过渡在 FF 中工作,但它在 Chrome 中工作。
这是我通过 jsFiddle 获得的代码:http://jsfiddle.net/hWnf4/
HTML:
<a href="http://example.com" title="" id="logo">
<span id="logoimg"></span></a>
CSS:
#logo {display:inline-block; padding-top:22px; text-decoration:none;font-family:'YanoneKaffeesatzRegular',"Helvetica", Arial, sans-serif;font-size:3em;margin-bottom:18px;}
#logo:link, #logo:visited {color:#fff;}
#logo:hover, #logo:active {color:#ccc;}
#logoimg {display:inline-block; width:405px; height:220px; background:url('http://www.webdesign-guru.co.uk/icon/wp-content/uploads/black-round-glassy.gif') no-repeat; transition: background .25s ease-in-out; -moz-transition: background .25s ease-in-out; -webkit-transition: background .25s ease-in-out;}
#logoimg:hover {background:url('http://www.webdesign-guru.co.uk/icon/wp-content/uploads/green-round-glassy-button.gif') no-repeat;}
【问题讨论】:
-
它适用于 FF。你用的是哪个版本的FF?
-
哦,我想我通过了那个问题。谢谢。可惜现在还不支持。 :(
标签: css css-transitions