![]() |
VOOZH | about |
The @import rule is used to import one style sheet into another style sheet. This rule also support media queries so that the user can import the media-dependent style sheet. The @import rule must be declared at the top of the document after any @charset declaration.
Syntax:
@import url|string list-of-mediaqueries;
Property Values:
Example: Consider the two CSS files as shown below.
@import url("i1css.css");
h1 {
color: #00ff00;
}h1 {
text-decoration: underline;
font-size:60px;
}
p {
padding-left: 20px;
font-size: 60px;
}
Link the first CSS file icss.css in the below HTML file and see the output.
Output:
Supported Browsers:The browsers supported by @import rule are listed below: