CSS - 背景位置在Firefox中不起作用

时间:2013-08-25 23:30:41

标签: html css background background-position

我在这里有这个网站:http://seasonsrestaurant.ca/

并且在Firefox中我的社交媒体图标都是推特图标。这是我的CSS。为什么背景位置不起作用?

ul.social-media li.twitter{
    background-image:url(http://www.seasonsrestaurant.ca/images/social.png);
    background-position-x:0px;
    width:25px;
    height:26px;
}

ul.social-media li.instagram{
    background-image:url(http://www.seasonsrestaurant.ca/images/social.png);
    background-position-x:-26px;
    width:25px;
    height:26px;
}

ul.social-media li.facebook{
    background-image:url(http://www.seasonsrestaurant.ca/images/social.png);
    background-position-x:-52px;
    width:25px;
    height:26px;
}

1 个答案:

答案 0 :(得分:2)

您使用的是非标准CSS属性,该属性适用于Chrome,但不适用于Firefox。

请参阅:Is background-position-x (background-position-y) a standard W3C CSS property?

但是,标准背景属性会解决问题。

相关问题