types of rules, except @charset rules; as it is not a nested statement, @import cannot be used inside conditional
group at-rules. @import.
How to use @import
You can use @import rule in following ways:
A. With internal style tag
Code: Select all
<style>
@import url('/css/styles.css');
</style>
The following line imports a CSS file named additional-styles.css in the root directory into the CSS file in which it
appears:
Code: Select all
@import '/additional-styles.css';
Code: Select all
@import 'https://fonts.googleapis.com/css?family=Lato';
Code: Select all
@import '/print-styles.css' print;
@import url('landscape.css') screen and (orientation:landscape);