Home  >  Article  >  Web Front-end  >  ie6兼容问题记录_html/css_WEB-ITnose

ie6兼容问题记录_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:52:351136browse

1.代码中,em换行写会造成一个空白。去掉em标签之间的空格,不换行。
2.利用margin设负值解决ie6下模块被顶换行的bug。
3.清除浮动的方法:父元素加overflow:hidden。
4.ie6中并列的几个块级元素如div和span,一些没有设置浮动一些设置右浮动,一行的宽度足够放下所有的块级元素,但此时ie6则显示右浮动的其中一块换行了
 *可将两部分代码位置交换
     缺点:破坏语义
 *绝对定位。
     优点:不破坏语义。
     缺点:代码量加大。

 *给他们都添加浮动。
     优点:同上。
     缺点:会引起其他bug等

 *添加hack。_margin-top:XXXXpx;
     优点:同上。
     缺点:使用了hack。

5.ie6中li的子元素有display:block样式的时候会造成li之间留白,给li添加_display:inline。

6.a中包含行内元素时空白部分点击无效,解决办法:给a加上背景色。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn