html page!--[if IE]...![endif]--Detailed introduction to usage

html page!--[if IE]...![endif]--Detailed introduction to usage

Copy code
The code is as follows:

<!--[if IE]><script type="text/javascript" src="resources/scripts/jquery.bgiframe.js"></script><![endif]-->

With the above code, jquery.bgiframe.js is loaded only when using IE. This is very important because if you load everything you will waste bandwidth and the page will open slowly! If it is specifically for IE6, change it to if IE6.

Copy code
The code is as follows:

<!--[if IE 6]>
<script type="text/javascript" src="resources/scripts/DD_belatedPNG_0.0.7a.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('.png_bg, img, li');
</script>
<![endif]-->

Or solve the layout problem of different versions of IE. The following only loads ie.css in IE7

Copy code
The code is as follows:

<!--[if lte IE 7]>
<link rel="stylesheet" href="resources/css/ie.css" type="text/css" media="screen" />
<![endif]-->

<<:  100-1% of the content on the website is navigation

>>:  Details of using vue activated in child components

Recommend

JS asynchronous code unit testing magic Promise

Table of contents Preface Promise chaining MDN Er...

Summary of 10 amazing tricks of Element-UI

Table of contents el-scrollbar scroll bar el-uplo...

Full analysis of Vue diff algorithm

Table of contents Preface Vue update view patch s...

Nodejs uses readline to prompt for content input example code

Table of contents Preface 1. bat executes js 2. T...

Designing the experience: What’s on the button

<br />Recently, UCDChina wrote a series of a...

MySQL Database Basics SQL Window Function Example Analysis Tutorial

Table of contents Introduction Introduction Aggre...

A simple and in-depth study of async and await in JavaScript

Table of contents 1. Introduction 2. Detailed exp...

Detailed explanation of JavaScript implementation of hash table

Table of contents 1. Hash table principle 2. The ...

CSS float property diagram float property details

Using the CSS float property correctly can become...

Detailed explanation of virtual DOM in Vue source code analysis

Why do we need virtual dom? Virtual DOM is design...

Docker enables seamless calling of shell commands between container and host

As shown below: nsenter -t 1 -m -u -n -i sh -c &q...

Solve the problem of inconsistency between mysql time and system time in docker

Recently, when I installed MySQL in Docker, I fou...

How to use CSS media query aspect-ratio less

CSS media query has a very convenient aspect rati...