Conditional annotation is a unique function of IE, which can process separate XHTML code for IE series products. Note that it is mainly aimed at XHTML, not CSS.
Conditional annotation function is very powerful, and can make true and false judgments, such as:
Program code
<!--[if IE]>This content is only visible to IE<![endif]-->
<!--[if IE 6.0]>This content is only visible in IE 6.0<![endif]-->
Conditional annotations can be determined by IE which version of the browser it is, and display the contents if they meet the conditions. The annotation function is supported from IE5.0 to 7.0, and the version number is accurate to 4 decimal places:
Program code
<!--[if IE 6.1000]>This content is only visible in IE 6.1<![endif]-->
IE conditional comments also support exclamation marks non-operation:
Program code
<!--[if !IE 6.0]>This content is visible except for IE 6.0 version<![endif]-->
It also supports prefixes, which are used to determine whether it is a higher version or a lower version:
Program code
<!--[if gt IE 5.0]>This content is only visible in IE 5.0 or above versions <![endif]-->
The full name of gt here is greater than the current conditional version or above, but does not include the current version.
There are several other prefixes:
lt means less than the current conditional version and does not include the current version.
gte means greeter than or equal version and includes the current version.
lte means less than or equal version below the current version and contains the current version.