Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the syntax of each version of IE CSS Hack

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today, I would like to share with you the relevant knowledge points about the grammar of each version of IE CSS Hack, which is detailed in content and clear in logic. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.

In order to be compatible with various versions of IE, you need to add additional code to CSS, such as the previously commonly used _ width. It works because browsers ignore style rules that cannot be parsed, so for example, writing _ width under width will resolve to width for non-IE browsers, while for IE6, it will override the previous width rules with _ width, thus achieving compatibility with IE6 browsers. The same compatibility approach exists for other versions of IE (6x11).

Here is a quick look-up list:

Div {

Property:value; / * ie 8 Universe 9pm /

Property:value9; / * ie 9 minutes /

* property:value; / * ie 7 minutes /

_ property:value; / * ie 6 months /

}

IE 6

* html .ie6 {property:value;}

Or

.ie6 {_ property:value;}

IE 7

* + html .ie7 {property:value;}

Or

*: first-child+html .ie7 {property:value;}

IE 6 and 7

@ media screen9 {

.ie67 {property:value;}}

Or

.ie67 {* property:value;}

Or

.ie67 {# property:value;}

IE 6, 7 and 8

@ media screen,screen9 {

.ie678 {property:value;}}

IE 8

Html > / * * / body .ie8 {property:value;}

Or

@ media screen {

.ie8 {property:value;}}

IE 8 Standards Mode Only

.ie8 {property / * * /: value9}

IE 8,9 and 10

@ media screen {

.ie8910 {property:value;}}

IE 9 only

@ media screen and (min-width:0) and (min-resolution: .001dpcm) {

/ / IE9 CSS

.ie9 {property:value;}}

IE 9 and above

@ media screen and (min-width:0) and (min-resolution: + 72dpi) {

/ / IE9+ CSS

.ie9up {property:value;}}

IE 9 and 10

@ media screen and (min-width:0) {

.ie910 {property:value9;} / * backslash-9 removes ie11+ & old Safari 4 * /}

IE 10 only

_:-ms-lang (x), .ie10 {property:value9;}

IE 10 and above

_:-ms-lang (x), .ie10up {property:value;}

Or

@ media all and (- ms-high-contrast: none), (- ms-high-contrast: active) {

.ie10up {property:value;}}

IE 11 (and above..)

_:-ms-fullscreen,: root .ie11up {property:value;}

These are all the contents of this article entitled "what are the grammars of each version of IE CSS Hack?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to 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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report