CSS兼容性总结

一、IE六、7不兼容display:inline-block浏览器

IE6\7下,display:inline与display:inline-block表现几乎同样spa

            li{get

                display: inline-block;class

                *display: inline;bug

                *zoom: 1;scroll

                width: 100px;方法

            }margin

二、IE7浮动的一个bug兼容

<label for="">fefef</label>di

<span>fwefwe</span>

若是span右浮动,则会形成label标签显示在下一行

解决方法:label左浮动

3.获取滚动条距离浏览器顶部的距离

IE: document.documentElement.scrollTop

DOM: document.body.scrollTop

4.IE6双边距问题:IE6下当元素的margin方向和浮动方向一致时,会致使margin为设置的两倍

解决方法:display:inline;

5.IE7不支持getAttribute('class')

解决方法:使用className

相关文章
相关标签/搜索