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

Vue encapsulation component upload picture component

This article example shares the specific code of ...

Invalid solution when defining multiple class attributes in HTML

In the process of writing HTML, we often define mu...

Use of Linux ls command

1. Introduction The ls command is used to display...

Detailed example of using useState in react

useState useState adds some internal state to a c...

Summary of the use of TypeScript in React projects

Preface This article will focus on the use of Typ...

Solution to ONLY_FULL_GROUP_BY error in Mysql5.7 and above

Recently, during the development process, the MyS...

Detailed steps for installing rockerChat in docker and setting up a chat room

Comprehensive Documentation github address https:...

Code for implementing simple arrow icon using div+CSS in HTML

In web design, we often use arrows as decoration ...

Summary of Common Commands for Getting Started with MySQL Database Basics

This article uses examples to describe the common...

Vue implements automatic jump to login page when token expires

The project was tested these days, and the tester...

Two implementation codes of Vue-router programmatic navigation

Two ways to navigate the page Declarative navigat...