What are the ways to import styles?
link and import
"index.css?1.1.11" rel="stylesheet">
- linkExcept When quoting style files, you can also cite resource files such as images, while import only cites style files
< link rel="search" type="application/opensearchdescription+xml" href="/content-search.xml" title="Baidu Search" />
- Compatible Different properties, link does not have compatibility issues, import is supported in IE5 and above, and is new to css2.1
- In the style sheet file, you can use import to import other style sheet files. However, link cannot
- #link refers to CSS and is loaded at the same time when the page is loaded; @import requires the page to be loaded after it is fully loaded.
- link supports using Javascript to control the DOM to change the style; @import does not support it.
- There are many ways to write import
@import 'style.css' //Windows IE4/ NS4, Mac OS X IE5, Macintosh IE4 /IE5/NS4 does not recognize@import "style.css?1.1.11" //Windows IE4/ NS4, Macintosh IE4/NS4 does not recognize
It is recommended to use @import url(index.css);
@import url(style.css) //Windows NS4, Macintosh NS4 does not recognize
@import url('style.css') //Windows NS4, Mac OS X IE5, Macintosh IE4/IE5/NS4 does not recognize
@import url("style.css?1.1.11" ) //Windows NS4, Macintosh NS4 does not recognize
The above is the detailed content of What are the ways to import styles?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



In macOS Sonoma, widgets don't have to be hidden off-screen or forgotten in the Notification Center panel like they did in previous versions of Apple's macOS. Instead, they can be placed directly on your Mac’s desktop – they’re also interactive. When not in use, macOS desktop widgets fade into the background in a monochrome style, reducing distractions and allowing you to focus on the task at hand in the active application or window. However, when you click on the desktop, they return to full color. If you prefer a drab look and want to retain that aspect of uniformity on your desktop, there's a way to make it permanent. The following steps demonstrate how it is done. Open the System Settings app

When we use this platform to listen to songs, most of them should have some songs that you want to listen to. Of course, some things may not be listened to because there is no copyright. Of course, we can also directly use some songs imported locally. Go up there so you can listen. We can download some songs and directly convert them into mp3 formats, so that they can be scanned on the mobile phone for import and other situations. However, for most users, they don’t know much about importing local song content, so in order to solve these problems well, today the editor will also explain it to you. The content method allows you to make better choices without asking. If you are interested,

How to use Vue to implement Excel import function Vue.js is a popular JavaScript framework for building user interfaces. It provides many convenient features and easy-to-use API, allowing us to quickly build feature-rich applications. In this article, we will introduce how to use Vue.js to implement Excel import function. First, we need to install a library called "xlsx", which is a JavaScript library that parses and extracts Excel file data.

OpenIV is a very convenient tool that can be used to import OIV files in GTA games. OIV files are a specific file format used to package mod or modification files into an easy-to-install format. This article will introduce how to use OpenIV to import OIV files. First, make sure you have the OpenIV software installed. If not, you can download it from the official website and follow the instructions to install it. Next, download the required OIV file from a trusted source. You can find various GTA modding communities or M

Summary of the system() function under Linux In the Linux system, the system() function is a very commonly used function, which can be used to execute command line commands. This article will introduce the system() function in detail and provide some specific code examples. 1. Basic usage of the system() function. The declaration of the system() function is as follows: intsystem(constchar*command); where the command parameter is a character.

Title: Methods and code examples to solve the problem of garbled characters when importing Chinese data into Oracle. When importing Chinese data into Oracle database, garbled characters often appear. This may be due to incorrect database character set settings or encoding conversion problems during the import process. . In order to solve this problem, we can take some methods to ensure that the imported Chinese data can be displayed correctly. The following are some solutions and specific code examples: 1. Check the database character set settings In the Oracle database, the character set settings are

Guide to solving misaligned WordPress web pages In WordPress website development, sometimes we encounter web page elements that are misaligned. This may be due to screen sizes on different devices, browser compatibility, or improper CSS style settings. To solve this misalignment, we need to carefully analyze the problem, find possible causes, and debug and repair it step by step. This article will share some common WordPress web page misalignment problems and corresponding solutions, and provide specific code examples to help develop

Do you know how to import external playlists on Soda Music App? Many users of the latest version of Soda Music App, when importing some playlists, do not like to import their own songs into the playlist, but this is limited. You can manage the classification of some of your songs very well when you listen to it, so friends who have ideas must give it a try and find out more. I believe you will like it, and you can have any ideas. Step-by-step tutorial for importing external playlists from Soda Music: 1. On the Soda Music app page, click and select the lower right corner to create a playlist. 2. Create a page, enter the playlist name, and click Save. 3. On the My Playlist page, select Add Songs. 4. Search, select your favorite songs, and add them to the playlist
