css hacker

来源:互联网 发布:sfda数据查询 编辑:程序博客网 时间:2024/06/03 16:24

内置:

  • 下划线”_” 和星号” * “: IE6识别的hacker;
  • ” * ” : IE7遨游识别的hacker;
  • “\9” : “\9”所有IE和FireFox的hacker;
  • “\0” : IE8及IE8+识别的hacker。

内置hacker使用示例:

.box {color:red\9; }    //ie6及IE6+识别此规则.box {color:red\0; }    //ie8及IE8+ 识别此规则.box {color:red\9\0; }    //ie8-10 识别此规则

外置 :

  • “*+”: IE7识别的hacker;
  • “*”:IE6识别的hacker。

外置hacker使用示例:

*+html .main{ color:red } //IE 7*html .main{ color:red } //IE6

注意事项:
1、注意写hack的顺序:hack尽量写在通用样式后面,否则hack会被后面的通用样式覆盖,譬如{color:red; *color:yellow; _color:green;};
2、IE6不识别 子选择器(“>”)。

0 0
原创粉丝点击