IE's conditional comments are a proprietary (and therefore non-standard) Microsoft extension to regular (X)HTML comments. IE's conditional comments are a proprietary (and therefore non-standard) Microsoft extension to regular (X)HTML comments. As the name suggests, conditional comments enable you to display a block of code based on a condition (such as the browser version). Although non-standard, conditional comments appear as regular comments to all other browsers and are therefore essentially harmless. Conditional comments first appeared in IE5 on Windows and have been supported by all subsequent versions of the Windows browser. IE's conditional comments are extremely effective and very easy to remember. The main disadvantage is that these comments need to be placed in the HTML page, not in the CSS. In this way, when you don't need these things or make some changes, you need to maintain a lot of places. Let’s look at a few examples – Only IE can recognize it <br />Because only IE5 and above versions support IE conditional comments, so "only IE" can recognize it means "only IE5 and above versions" can recognize it. Only specific versions can be recognized <br />For example, only IE5 can be recognized, only IE6 can be recognized, only IE7 or IE8 can be recognized. The identification condition is a specific version, neither higher nor lower versions are acceptable. For example, the following code block will only work in IE8 <!--[if IE 8]> <style type="text/css"> @import "test.css"; </style> <![endif]--> ![]() Only versions that are not specific can be recognized . Of course, IE browser needs to be version 5 or above to be within the scope of discussion. For example, in the following example, IE7 is specified as not being recognized. <!--[if !IE 7]> <style type="text/css"> @import "test.css"; </style> <![endif]--> ![]() Previous Page 1 2 3 Next Page Read More |
>>: How to add docker port and get dockerfile
Cluster Deployment Overview 172.22.12.20 172.22.1...
count script #!/bin/sh numOfArgs=$# if [ $numOfAr...
Table of contents Preface Virtual DOM What is Vir...
1. First stop the mysql service As an administrat...
1. What is a virtual host? Virtual hosts use spec...
The specific code is as follows: package epoint.m...
Table of contents Oracle Isolation Levels MySQL I...
Table of contents Question: Case (1) fork before ...
Problem Description html <iframe id="h5Co...
This article shares the installation steps of MyS...
Data integrity is divided into: entity integrity,...
environment System: Ubuntu 18.04 Software: qt5.12...
This article shares with you how to use thinkphp5...
introduce Setting up read-write separation for th...
Sometimes, in order to facilitate the export and ...