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

How to set the position of the block element in the middle of the window

How to set the position of the block element in t...

How to create a new user in CentOS and enable key login

Table of contents Create a new user Authorize new...

How to install and connect Navicat in MySQL 8.0.20 and what to pay attention to

Things to note 1. First, you need to create a my....

Installation of Docker CE on Ubuntu

This article is used to record the installation o...

...

Why is IE6 used by the most people?

First and foremost, I am a web designer. To be mor...

Basic notes on html and css (must read for front-end)

When I first came into contact with HTML, I alway...

Detailed examples of replace and replace into in MySQL into_Mysql

MySQL replace and replace into are both frequentl...

TimePicker in element disables part of the time (disabled to minutes)

The project requirements are: select date and tim...

Detailed explanation of viewing and setting SQL Mode in MySQL

Viewing and Setting SQL Mode in MySQL MySQL can r...

Instance method for mysql string concatenation and setting null value

#String concatenation concat(s1,s2); concatenate ...

Introduction to the use of common Dockerfile commands

Table of contents 01 CMD 02 ENTRYPOINT 03 WORKDIR...