Home > Web Front-end > CSS Tutorial > CSS @import Usage: Rules

CSS @import Usage: Rules

WBOY
Release: 2023-08-27 09:37:02
forward
1045 people have browsed it

CSS @import 的用法:规则

@import: Rule imports another style sheet into the current style sheet. It should appear before any rules at the beginning of the style sheet, and its value is a URL.

Example

You could write like this:

<style>
   <!--
      @import "mystyle.css";
      or
      @import url("mystyle.css");
      .......other CSS rules .....
   -->
</style>
Copy after login

@import The importance of the rule is that it allows you to develop your stylesheet using a modular approach. You can create various style sheets and include them wherever you need.

The above is the detailed content of CSS @import Usage: Rules. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template