Solution 1: Use conditional import in HTML document, such as inserting the following code in HEAD: Copy code The code is as follows:<!--[if IE 6]> <link rel="stylesheet" href="ie.css" type="text/css" /> <![endif]--> <!--[if IE]> <link type="text/css" media="screen" rel="stylesheet" href="js/colorbox-custom-ie.css" title="Cleanity" /> <![endif]--> Solution 2: Use conditional import at the beginning of the CSS document, as shown in the following code: Copy code The code is as follows:[if SafMob] @import('iphone.css'); [if !SafMob] @import('non-iphone.css'); The order in which the browser loads CSS: 1. Load the HTML page specified by the URL 2. Parsing HTML 3. Remotely obtain the css file referenced by the link tag 4. Load and execute the obtained css file. When encountering the code @import url("xx.css"), xx.css will be obtained remotely. 5. Load and execute xx.css You can import up to 31 CSS files through @import. Since each remote retrieval of a CSS file will generate an http link, it is time-consuming, so it is best to use @import as little as possible. 31. I don’t think any project will use so many. |
<<: Hbase installation and configuration tutorial under Linux
>>: If I change a property randomly in Vue data, will the view be updated?
ElasticSearch cluster supports動態請求的方式and靜態配置文件to ...
This article uses examples to explain the basic k...
This article uses examples to illustrate the erro...
There is often a scenario where the image needs t...
When exporting data to operations, it is inevitab...
The Nginx ngx_http_image_filter_module module (ng...
You can install Docker and perform simple operati...
Here is a brief summary of the installation and c...
Preface When it comes to database transactions, a...
And, many times, maintenance requires your website...
This tutorial introduces the application of vario...
Docker Learning https://www.cnblogs.com/poloyy/p/...
Record the installation and configuration method ...
hash mode (default) Working principle: Monitor th...
The link-in style is to put all the styles in one...