gpt4 book ai didi

css - CSS 属性前星号的用途

转载 作者:数据小太阳 更新时间:2023-10-29 09:06:57 25 4
gpt4 key购买 nike

以下内容摘自 Yahoo CSS 重置。有人可以解释一下星号的用途吗?

body {
font:13px/1.231 arial,helvetica,clean,sans-serif;
*font-size:small;
*font:x-small;
}

最佳答案

这是针对 Internet Explorer 7 或以下版本的浏览器特定 CSS hack。

*property: value

Although Internet Explorer 7 corrected its behavior when a property name is prefixed with an underscore or a hyphen, other non-alphanumeric character prefixes are treated as they were in IE6. Therefore, if you add a non-alphanumeric character such as an asterisk (*) immediately before a property name, the property will be applied in IE and not in other browsers. Unlike with the hyphen and underscore method, the CSS specification makes no reservations for the asterisk as a prefix, so use of this hack could result in unexpected behavior as the CSS specifications evolve.

*property: value applies the property value in IE 7 and below. It may or may not work in future versions. Warning: this uses invalid CSS.

发件人:http://www.javascriptkit.com/dhtmltutors/csshacks3.shtml

关于css - CSS 属性前星号的用途,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1690642/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com