CSS @import rule

CSS @import rule

CSS @import is an at-rule statement.

It is used to import style sheets.

When declaring it, except @charset no other elements can precede it.

It shouldn't be used in <style> element and in style attribute.

@import 'custom.css';

@import url("custom.css");

Example

Try Yourself