星号在CSS属性名称中做什么? [英] What does an asterisk do in a CSS property name?
问题描述
可能重复:
CSS重置 - 样式中asterik的用途
我知道星号在CSS选择器中的作用(什么Asterisk做吗?),但它在属性名称做什么?这里是YUI使用的CSS的示例。我不知道 *显示
是什么。
I know what an asterisk does in a selector for CSS (What does an Asterisk do?), but what does it do in a property name? Here is an example of CSS used by YUI. I don't know what the *display
does.
.yui-button .first-child
{
display:block;
*display:inline-block;
}
推荐答案
这是一个语法错误。因此,在CSS中,它使属性名无效并停止解析。
It is a syntax error. So in CSS, it makes the property name invalid and stops it being parsed.
由于浏览器中的错误,它有时被忽略。这有效地导致属性仅适用于特定的特定bug的浏览器 - IE7。
Thanks to bugs in browsers, it is sometimes ignored. This effectively causes the property to apply only to browsers featuring that particular bug — IE7.
一般来说,应避免使用条件注释。
In general, it should be avoided in favour of conditional comments.
这篇关于星号在CSS属性名称中做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!