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?
This time we use HTML+CSS layout to make a prelim...
I have been using MySQL recently. The article mys...
Recently, a problem occurred in the project. The ...
1. Under 800*600, if the width of the web page is...
Installation Steps 1. Install Redis Download the ...
This article shares the specific code for JavaScr...
Follow the official tutorial, download the instal...
Table of contents 1. Analysis of key source code ...
Table of contents 1. How to create an array in Ja...
This article example shares the specific code of ...
Table of contents Create a layout Add CSS styles ...
Generally, click events will be divided into diff...
A few days ago, I found that the official version...
This article uses examples to illustrate the prin...
Table of contents Introduction Public code (backe...