Specifies a stylesheet to import.
@import url | layer | supports | media query;
url |
String specifying the URL referencing a cascading style sheet. |
layer |
Name of a cascade layer into which the contents of the linked resource are imported. |
supports |
Indicates the feature(s) that the browser must support in order for the stylesheet to be imported. |
media query |
A comma-separated list of media queries, which specify the media-dependent conditions for applying the CSS rules defined in the linked URL. |
The @import at-rule is used to import style rules from other valid stylesheets.
An @import rule must be defined at the top of the stylesheet, before any other at-rule ( except @charset and @layer ) and style declarations, or it will be ignored.
Rules in the stylesheet override rules in the imported stylesheet.
Using the @import rule differs from using the <link> object in that the @import statement is used as part of a stylesheet definition inside a <link
> or a <style> tag.
The following example imports a stylesheet located at http://anotherStyleSheet.css.
<style type="css/text">
@import url( "http://anotherStyleSheet.css" )
</style>
link style