In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Editor to share with you the example analysis of CSS HACK in IE6/IE7/IE8/IE9/FF, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
HACK principle: different browsers recognize different characters (after reading the article, you will find that FF and IE8 have exactly the same ability to recognize the following characters)
Special character recognition tables are commonly used in CSS:
(1) *: IE6+IE7 can recognize *, but the standard browser FF+IE8 cannot recognize *.
(2)! important: except IE6 can not recognize! important, FF+IE8+IE7 can recognize! important
(3) _: FF+IE8+IE7 does not support _ except IE6 support
(4)\ 9: all IE browsers recognize (IE6, IE7, IE8, IE9)
(5)\ 0: valid for IE8 only
Example:
(1) distinguish between FF (IE8) and IE6 IE7
The background color of backgorund:orange; FF and IE8 will be orange
* backgorund:red; IE6 and IE7 background colors will be red
(2) distinguish FF (IE8) from IE6 and IE7.
The background color of background:orange; FF and IE8 will be orange
* background:red! important; IE7 background color will be red
* background:blue; IE6 background color will be blue
(3) distinguish FF (IE8) from IE6 and IE7.
The background color of background:orange; FF and IE8 will be orange
* background:red; IE7 background color will be red
_ background:blue; IE6 background color will be blue
(4) distinguish FF from IE6 IE7 E8
Text colors of non-IE browsers such as color:gray; FF will be gray
Color:red\ 9; IE8 IE9 will be red
You can understand at a glance:
The code is as follows:
Div {
Width:400px
Height:400px
Background-color:red
Background-color:blue\ 9; / * all IE*/
Background-color:yellow\ 0; / * IE8 hack*/
_ background-color:#CDCDCD; / * ie 6 months /
* + html background-color:white; / * IE7*/ only
* background-color:pink; / * IE6 IE7 hack*/
@ background-color:white; / * opera hack*/
}
The above is all the content of the article "sample Analysis of CSS HACK in IE6/IE7/IE8/IE9/FF". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.