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

CSS @import Usage: Rules

WBOY
WBOYforward
2023-08-27 09:37:021045browse

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>

@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!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete