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
<br />When thoughts were divided into East a...
This article mainly introduces the example analys...
Next, we will learn how to monitor server perform...
Table of contents iview-admin2.0 built-in permiss...
Table of contents 1. Basic Use 2. Image quantity ...
The most common way is to set a primary key or un...
This article records the detailed tutorial for in...
1. Find out whether MySQL was installed before Co...
There are two ways to create a primary key: creat...
Effect: <div class="imgs"> <!-...
1. Use the shortcut Ctrl + Shift + P to call out ...
Preface: The MySQL database provides a wide range...
Refer to the official documentation here for oper...
Preface A few days ago, I came across the feature...
1. Use the transform attribute to display the ima...