css li的图标问题

html-css08

css li的图标问题,第1张

<html><title>列表样式图片 list-style-image</title><head><style type="text/css">ul li{ list-style-type:none} ul li{ background:url( 地址换成你的!其他的不要动) no-repeat 4px 5pxline-height:30pxfont-family:"宋体"font-size:12px} </style></head><body><ul><li>卖品网</li><li>购物平台</li><li>购物评论</li><li>商品优惠信息</li></ul></body></html>ul li{list-style-type:none}让li前面没有那个点的! background:url(图片地址) no-repeat(不平铺)4px(上下距离)5px(左右距离)

给你段代码,如果你会CSS的话就应该能自己用了!

<style>

ul{list-style-type:none}

li{background:url(你的图标路径) no-repeat center left<br/> padding-left:具体数值//这是根据你背景图片的宽度而定的,也就是你图片有多宽,文本就离左边多这样就不会覆盖背景图片,达到实现你想要的那种效果!<br/>}

</style>