Zao's Blog
感谢上天,我不是一个人在战斗!
十二月
11

★IE 6 and below

Use * html {} to select the html element.

★IE 7 and below

Use *+html* html {} to select the html element. 或者在属性前加“>” #id { >color: red;}
但*+html 和* html要分开两句写,否则无效。

★IE 7 and IE 5.01

Use *+html {} to select the html element.

★IE 7 only
Use *+html {} and "!important" .含有"!important"属性的语句必须放在前,以免被覆盖。

★IE 7 and modern browsers only

Use html>body {} to select the body element.

★Modern browsers only (not IE 7)

Use html>/**/body {} to select the body element.

★仅IE6不识别
select { display /*IE6不识别*/:none;}
这里主要是通过CSS注释分开一个属性与值,注释在冒号前,并注意注释前的空格。

★仅IE6与IE5(IE5.5除外)不识别
select/*IE5不识别*/ { display /*IE6不识别*/:none;}
这里与上面一句不同的是在选择符与花括号之间多了一个CSS注释。

★仅IE5(IE5.5除外)不识别
select/*IE5不识别*/ { display:none;}
这一句是在上一句中去掉了属性区的注释。只有IE5不识别

★IE5.01滑动菜单空白bug(用列表表示菜单时的问题)
/* Hides from IE5-mac \*/
* html .menu { height: 1%;}
/* End hide from IE5-mac */

注意,以上的hack要起作用的话,至少应该定义DOCTYPE为

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

发表评论





改变评论框高度:增大(+) | 减小(-)