<style type="text/css">
ul{list-style:none; padding:0; margin:0; margin-left:50px;}
ul li{background:url(../image/li_point.gif) no-repeat left center; font-size:12px; height:18px; text-indent:16px; line-height:18px; }
</style>
通过背景定位与text-indent首行文字缩进控制控制文字起始位置实现,上面代码在firefox下效果是忒棒.
可以利用css hack调整到完美状态:
<style type="text/css">
ul{list-style:none; padding:0; margin:0; margin-left:50px;}
ul li{background:url(../image/li_point.gif) no-repeat left center; font-size:12px; height:18px; *height:16px; text-indent:16px; line-height:18px; *padding-top:2px;}
</style>
红色标示使IE下文字下沉2px从而与前面的黑色点点完美对齐。
原载: No.1网络工作室 http://www.noonenet.cn/