我有一些无序列表,如果光标悬停在它上面就会显示一个背景图像:
<div class="sidebar">
<ul>
<li>test</li>
<li>test</li>
<li>test</li>
</ul>
</div>
和CSS:
/* I DON'T HAVE STYLE FOR <UL> */
.sidebar li {
list-style-type: none;
}
.sidebar li:hover {
list-style-type: none;
background-repeat: repeat-x;
background-image: url(../img/mbg.png);
color:white;
}
但看起来像是:
如何让背景到达左边?谢谢!