CSS Hack, csshack
Previous
CSS Hack is a full-disclosure method for implementing Browser style compatibility. If you don't need it, try not to use it. However, for some browser bugs, such as the old version of IE, sometimes CSS Hack is a last resort. This article describes CSS Hack in detail. CSS Hack is mainly divided into two types: Property Tag Method and Selector prefix Method
Attribute tagging
[IE6 -]
For IE 6-browsers, use the underscore (_) and hyphen (-).
_color:blue;-color:blue;
[IE7 -]
For IE7-browsers, you can use a lot of characters, including '~! @ # $ % ^ & * () = + {[]: <> ,.? /
However, the commonly used plus sign + and star number *
+color:blue;*color:blue;
[IE10 -]
Use the suffix \ 9 to identify IE10-Browser
color:blue\9;
[IE8 +]
Use the suffix \ 0 to identify IE8 + browsers
color:blue\0;
[IE9, IE10]
Use the suffix \ 9 \ 0 to identify IE9 and 10 browsers
color:blue\9\0;
Selector prefix
[IE6 -]
Add * html in front of the selector to identify IE 6-Browser
[Note] * Whether there are spaces between html and html will take effect.
*html div{color:red}
[IE7]
Add * + html in front of the selector to identify IE 7 browsers
[Note] *, +, and html can take effect with or without spaces
*+html div{color:red}
[IE8]
@ Media \ 0 can be used in the outer layer of the selector to identify IE 8 browsers.
[Note] @ media and \ 0 must have spaces
@media \0{ div{color:red}}
[IE9 + and other non-ie browsers]
Add: root before selector to identify IE9 + and other non-ie browsers
:root div{color:red}