We all know that there are differences between browsers.XHTML + CSSThis was a headache for Web pages. A lot of skills are required to work under the influence of these differences,"HideCSS"Is a very important technique (or even the most important ). The main idea of this technique is to hide some overloadedCSSRules.
This articleArticleIt is not intended to teach you how to use this technique.CSSFor basic design developers, I assume that you have used some kind of hidingCSSRule method. Here we want to list available methods and browsers with hidden rules so that you can check them at any time during normal work.
Nine methods are listed in this large table."An exclusive sword", Hope to help you
Note: This table is originalW3development.de.
After reading this table, my first response is:MozillaAndOperaThey are really gods. Only one rule willOperaThe oldest version works, so we will not consider hiding rules later.MozillaAndOpera. The nine types are listed below"Jianfa"I also noted the use cases I personally recommended. Note that the recommended items do not necessarily match your requirements. before using them, check the table above.
@ Import URL ("")
@ Import URL ("global.css ")
For earlier versions (versions earlier5.
@ Import URL ()
@ Import url(global.css)
PairWindowsOld version of the platform (version number less5) The browser hides the rule.
@ Import ""
@ Import "global.css"
PairWindowsOld version of the platform (version number less5) The browser hides the rule.
Media = ""
<Link href = "global.css" type = "text/CSS" rel = "stylesheet" Media = "all"/>
PairNetscape 4.xHide rules.
@ Media
@ Media all {
.../*Rules to be hidden*/
}
If you only considerNnAndIEOnly4. xVersion hiding rules.
Comment
# Anyselector/**/{color: # f00 ;}
This is a precise missile. Only pairIe5And later versions. So if you wantIe5AndIe5.5Define rules separately.
Attribute
P [ID] {color :# 0f 0 ;}
Another precise missile. If you do not care about the old browser versionIEHide rules. For more information about the attribute selector, seeW3CDocumentation.
Child
P> span {color :# 00f ;}
Basically the same as above,MacPlatform versionIEThis rule is supported.
tantek
P # tantek {
voice-family :"\"}\""; /* Some browsers parse bugs */
voice-family: Inherit; /* */
color: # f00;
}< P>
famous CSS technique, hide rules for all " non-modern " browsers