【发布时间】:2023-03-05 19:46:02
【问题描述】:
据我所知,它在网站的其他地方使用相同的 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;
}
【问题讨论】:
-
嗨,我在我的项目中几乎有与你相同的结构化 css,我在 FF 中也有同样的问题......我认为这与 background-image 属性有关......我改变了我的背景图片:url(../images/linkedin.png);只是一个简单的背景,看看过渡是否有效并且确实有效...背景:#fff; ...这仍然没有解决它,但它只是表明它与在背景图像上使用过渡有关..我仍在寻找解决方案...