1

我正在尝试在每个侧面添加特殊的 jpg 图像<li>

但是list-style-image:url('sqpurple.jpg');工作不好,如何使子弹的位置在电梯侧?

4

2 回答 2

2

最好的方法是使用背景图像而不是列表样式

#ul_id { 
   list-style: none; padding 0px; margin: 0px;}

 #ul_id li {
   background-image: url("/Content/Icons/bullet.png"); // url path location
   background-position: 1px 2px; // the position of the background
   background-repeat: no-repeat; // make the background not to repeat
            }
于 2013-07-17T19:03:35.437 回答
0

使用list-style-postion 通过以下更改尝试您的代码

ul li{
  list-style-position: outside;
  list-style-image: url(sqpurple.jpg);
  padding-left: 10px 
}

或使用背景图像

ul{
   list-style-type: none;
   padding: 0;
   margin: 0;
}
li{
   background: url(arrow.gif) no-repeat left top;
   padding-left: .6em;
}
于 2013-07-17T19:37:08.130 回答