IE中css控制list-style-type有问题请教前辈.希望前辈回答以下两个关于list-style-type的问

问题描述:

IE中css控制list-style-type有问题请教前辈.希望前辈回答以下两个关于list-style-type的问题.谢谢.

希望知道问题所在的网友回答一下!.Thank.
1个回答 分类:综合 2014-10-27

问题解答:

我来补答
你说的都是IE7的问题,不是你的问题.在IE8和IE9里面就没有这些问题,你可以试一下.
而且你这两个问题可以说是同一个问题.
第一个问题的英文解释:http://reference.sitepoint.com/css/list-style-type
这是因为在早期版本的IE中,有一个很重要的属性,叫haslayout,你可以看下百度百科的解释
http://baike.baidu.com/view/2945869.htm但是中文的解释不是很详细,如果你的英文好的话,可以下看这个网页,解释得很清楚http://reference.sitepoint.com/css/haslayout
英文解释里有这么一句话
Internet Explorer for Windows versions up to and including 7 will not increment the list markers in numbering systems if the list item has haslayout.
也就是说直到IE7,只要li有haslayout属性,就不能用增长的数字作为list的样式.
一个li元素怎样才会有haslayout属性呢?
就是你给元素设置了以下属性:
display: inline-block
height: (any value except auto)
float: (left or right)
position: absolute
width: (any value except auto)
writing-mode: tb-rl
zoom: (any value except normal)
Internet Explorer 7 has some additional properties that cause an element to gain a layout (this is not an exhaustive list):
IE7还有跟多的属性,可能会给元素添加layout:(这还不是全部的列表)
min-height: (any value)
max-height: (any value except none)
min-width: (any value)
max-width: (any value except none)
overflow: (any value except visible)
overflow-x: (any value except visible)
overflow-y: (any value except visible)5
position: fixed
我刚转了一篇博客,在参考资料里
再问: 问题1:我是在IE6测试的!不是IE7!也没有对IE7、8、9进行测试....! 问题2:还有list-style-type在IE6中不单单decimal值不能正常显示!而是全部list-style-type属性值都不能显示。 问题3:还有你说的【也就是说直到IE7,只要li有haslayout属性,就不能用增长的数字作为list的样式。】那请问..IE6有haslayout属性吗?IE8、9也haslayout属性吗??? 希望回答以上3个问题!谢谢。
再答: 1,IE6还不如IE7呢,他是有史以来最烂的,对网页支持最差的浏览器,没有之一!!! 2,我这里已经没有IE6了,不能帮你测试,在参考资料里,给你一个网址,你去看一下IE的css bug列表。 3,我说的是IE7以下,也就是说IE5,IE6等都是有的,但是IE8和IE9就已经不看haslayout这个属性了,所以IE8和IE9的显示应该是和firefox里一样的。
 
 
展开全文阅读
剩余:2000