Home > Web Front-end > HTML Tutorial > IE conditional comments for XHTML_HTML/Xhtml_Web page production

IE conditional comments for XHTML_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:45:32
Original
1469 people have browsed it

Conditional comments are a unique function of IE, which can process separate XHTML code for IE series products. Note that it is mainly for XHTML, not CSS.
Conditional comments are very powerful and can be used to judge true and false, for example:
Program code


Conditional comments can be used by IE to determine what version of the browser it is, and the content will be displayed if the conditions are met. The comment function is supported from IE5.0 to 7.0, and the version number is accurate to 4 decimal places:
Program code

IE conditional comments also support exclamation mark non-operation:
Program code

And supports prefixes to determine whether it is a higher version or a lower version:
Program code

The full name of gt here is greater than, which means the version above the current conditional version, but does not include the current version.
There are several other prefixes:
lt means less than the version below the current conditional version, excluding the current version.
gte means greeter than or equal to the current version or above, and includes the current version.
lte means less than or equal to the version below the current version and includes the current version.
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template