IE conditional comments for XHTML

IE conditional comments for XHTML
<br />Conditional comments are a feature unique to IE that can perform separate XHTML code processing on IE series products. Note that it is mainly for XHTML, not CSS.
Conditional comments are very powerful and can be used to make true and false judgments, for example:
Program Code
<!--[if IE]>This content is only visible to IE<![endif]-->
<!--[if IE 6.0]>This content is only visible to IE6.0<![endif]-->
Conditional comments can be used by IE to determine the version of the browser and display the content if the conditions are met. IE5.0 to 7.0 all support the comment function, and the version number is accurate to 4 decimal places:
Program Code
<!--[if IE 6.1000]>This content is only visible in IE6.1<![endif]-->
IE conditional comments also support the exclamation mark non-operation:
Program Code
<!--[if !IE 6.0]>This content is visible except for IE6.0 version<![endif]-->
And it supports prefixes to determine higher or lower versions:
Program Code
<!--[if gt IE 5.0]>This content is only visible in IE5.0 and above<![endif]-->
The gt here stands for greater than, which means versions above the current condition version, but not including the current version.
There are several other prefixes:
lt means less than the version below the current condition version, excluding the current version.
gte means greeter than or equal to the current version and including the current version.
lte means less than or equal to the current version and includes the current version.

<<:  How to modify the contents of an existing Docker container

>>:  Detailed explanation of MySQL sql_mode query and setting

Recommend

Detailed explanation of MySQL user rights verification and management methods

This article uses examples to illustrate how to v...

Use of MySQL truncate table statement

The Truncate table statement is used to delete/tr...

Ten Experiences in Web Design in 2008

<br />The Internet is constantly changing, a...

Can CSS be used like this? The art of whimsical gradients

In the previous article - The charm of one line o...

Nexus uses nginx proxy to support HTTPS protocol

background All company websites need to support t...

JavaScript to implement the web version of Gobang game

This article shares the specific code for JavaScr...

Native JS realizes compound motion of various motions

This article shares with you a compound motion im...

Share JS four fun hacker background effect codes

Table of contents Example 1 Example 2 Example 3 E...

How to solve the phantom read problem in MySQL

Table of contents Preface 1. What is phantom read...

Vue implements adding watermark effect to the page

Recently, when I was working on a project, I was ...

Examples of MySQL and Python interaction

Table of contents 1. Prepare data Create a data t...

How to use gdb to debug core files in Linux

1.core file When a Segmentation fault (core dumpe...

Understanding the CSS transform-origin property

Preface I recently made a fireworks animation, wh...