为什么我的CSS3 Transition无法在Firefox中运行?

时间:2011-05-21 20:25:29

标签: firefox css3

据我所知,它在网站的其他地方使用相同的CSS。 它适用于Chrome。  以下是整页:anthonyotislawrence.com

这是不起作用的部分:

<a class="socialBox linkedIn">
    <h3>LinkedIn</h3>
    <p>linkedin.com/anthonyotislawrence</p>
</a> 
<a class="socialBox facebook">
    <h3>Facebook</h3>
    <p>facebook.com/anthonyotislawrence</p>
</a>

和CSS

.socialBox {
    display:block;
    min-width:200px;
    padding:4px 0 4px 55px;
    height:40px;
    line-height:20px;
    background-repeat:no-repeat;
    background-position:left center;
    position:relative;
    -webkit-transition: all .5s ease-out;
    -moz-transition: all .5s ease-out;
    transition: all .5s ease-out;
    text-decoration:none;
    margin:30px 0;
}
.socialBox.linkedIn {
    background-image:url(../images/linkedin.png);
}
.socialBox.facebook {
    background-image:url(../images/facebook.png);
}
.socialBox:hover {
    left:15px;
    cursor:pointer;
}
.socialBox:hover p {
    text-decoration:underline;
}

2 个答案:

答案 0 :(得分:41)

看起来FF不会转换默认值。它们必须在原始元素上声明,然后才能转换为新属性。

答案 1 :(得分:4)

我遇到类似于OP的问题,我的转换工作在除Firefox之外的每个浏览器中。在我的情况下,我有零秒的间隔。我只用了0而不是0。这导致转换在Firefox中根本不起作用。我认为这不是OP的问题,而是发布在这里,以防其他人帮忙。

这在Firefox中不起作用:

top 0 linear 1s

这有效:

top 0s linear 1s
相关问题