我正在尝试在每个 <li>
的边上添加特殊的 jpg 图像
但是list-style-image:url('sqpurple.jpg');
做不好,如何让子弹的位置在电梯侧?
最佳答案
最好的方法是使用背景图像而不是列表样式
#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
}
关于html - 为 <li> 添加特殊背景图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17708101/