背景图像不会出现在Chrome
问题描述:
我有一个简单的列表,在每个元素的背景图像。该图像在Firefox中显示,但在Chrome(Windows操作系统)中不显示。这些是附加到列表中的样式:背景图像不会出现在Chrome
ul li
{
position: relative;
border-bottom-width: 1px;
border-bottom-style: dotted;
border-bottom-color: #777777;
width: 378px;
float: left;
padding-top: 6px;
padding-right: 0px;
padding-left: 30px;
font-size: 12px;
font-family: Arial,Helvetica,sans-serif;
color: #575656;
line-height: 19px;
background-color: transparent;
background-image: url("../images/tir.png");
background-repeat: no-repeat;
background-attachment: scroll;
background-position: left top 6px;
background-clip: border-box;
background-origin: padding-box;
background-size: auto auto;
padding-bottom: 3px;
}
有人可以发现这有什么问题吗?
答
代码似乎工作.. http://jsfiddle.net/LZKG6/ (我使用Chrome在Ubuntu)
可能这是错误的:
background-position: left top 6px;
我认为额外的“6像素“ 是无效的。
内容仅指定2个值,而不是3: http://www.w3schools.com/cssref/pr_background-position.asp
怎么样[小提琴](http://jsfiddle.net)来演示? –
@TWWalters我在我的问题中添加了一个小提琴。 ...它在小提琴中奏效。但是没有其他样式应用于列表。我认为。我想回到实验室。 – jovan