IE6中,如果list的子节点display为block属性,IE6会把HTML文档中的换行符呈现出来,以至于list之间出现空白的间隔,代码如下:
<style type="text/css"> * {margin:0;padding:0;} li {list-style:none;} li span { display: block; background-color:#f1f1f1; zoom:1; /*去掉zoom属性,查看IE6下span的haslayout值*/ } </style> <ul> <li><span>link items</span></li> <li><span>link items</span></li> <li><span>link items</span></li> </ul>
No comments:
Post a Comment