Conditional annotation_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:45:00
Original
1089 people have browsed it

Introduction to conditional comments

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.

2 conditional comment attributes

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

3 Conditional comment writing

For non-IE

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!