This question already has an answer here:
这个问题已经有了答案:
- What does a star-preceded property mean in CSS? 4 answers
- 在CSS中,星星先于属性意味着什么?4答案
I'm using the Yahoo YUI libraries in a project. Can anyone help me understand the following CSS that I came across in the layout manager CSS:
我正在一个项目中使用Yahoo YUI库。有谁能帮助我理解我在布局管理器CSS中遇到的以下CSS:
I have been unable to figure out what the * (star) does to the declarations in the following CSS:
我一直无法弄清楚*(星号)对下面CSS中的声明做了什么:
.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd {
border:1px solid #808080;
border-bottom:none;
border-top:none;
*border-bottom-width:0;
*border-top-width:0;
background-color:#f2f2f2;
text-align:left;
}
2 个解决方案
#1
29
This is a hack to apply styles only to older versions of IE the * declared styles will override the new style elements , that are unsuported by Od IE only. http://en.wikipedia.org/wiki/CSS_filter#Star_hack
这是一种只对旧版本IE应用样式的技巧,*声明的样式将覆盖新的样式元素,这些元素是仅由Od IE不支持的。http://en.wikipedia.org/wiki/CSS_filter Star_hack
#2
2
The star exploits a bug in version 7 and below of Internet Explorer and is used to make IE render your markup correctly. More information here: http://www.ejeliot.com/blog/63
该星型利用了Internet Explorer 7和以下版本中的一个bug,用于使IE正确呈现标记。更多信息:http://www.ejeliot.com/blog/63
#1
29
This is a hack to apply styles only to older versions of IE the * declared styles will override the new style elements , that are unsuported by Od IE only. http://en.wikipedia.org/wiki/CSS_filter#Star_hack
这是一种只对旧版本IE应用样式的技巧,*声明的样式将覆盖新的样式元素,这些元素是仅由Od IE不支持的。http://en.wikipedia.org/wiki/CSS_filter Star_hack
#2
2
The star exploits a bug in version 7 and below of Internet Explorer and is used to make IE render your markup correctly. More information here: http://www.ejeliot.com/blog/63
该星型利用了Internet Explorer 7和以下版本中的一个bug,用于使IE正确呈现标记。更多信息:http://www.ejeliot.com/blog/63