Home > Article > Web Front-end > Conditional annotation_html/css_WEB-ITnose
Conditional comments in IE have excellent ability to distinguish IE versions from IE and non-IE, and are a commonly used hack method in WEB design.
Conditional comments can only be used in IE5 and above.
If you have multiple IEs installed, the conditional comments will be based on the highest version of IE.
The basic structure of conditional comments is the same as HTML comments (). Therefore browsers other than IE will treat them as ordinary comments and ignore them completely.
IE will use the if condition to determine whether to parse the content in the conditional comment like normal page content.
gt: greater than, select the conditional version or above, excluding the conditional version
lt: less than, select the conditional version or below, excluding the conditional version Conditional version
gte: greater than or equal, select the version above the conditional version, including the conditional version
lte: less than or equal, select the version below the conditional version, include the conditional version
! : Select all versions except the conditional version, no matter high or low
For non-IE