📅  最后修改于: 2020-10-22 07:10:49             🧑  作者: Mango
在本章中,我们将了解LESS中导入选项的重要性。 LESS提供了@import语句,该语句允许样式表导入LESS和CSS样式表。
下表列出了将在import语句中实现的import指令。
Sr.No. | Import options & Description |
---|---|
1 | reference
It uses a LESS file only as reference and will not output it. |
2 | inline
It enables you to copy your CSS into the output without being processed. |
3 | less
It will treat the imported file as the regular LESS file, despite whatever may be the file extension. |
4 | css
It will treat the imported file as the regular CSS file, despite whatever may be the file extension. |
5 | once
It will import the file only one time. |
6 | multiple
It will import the file multiple times. |
7 | optional
It continues compiling even though the file to import is not found. |
@import语句中可以使用多个关键字,但是您必须使用逗号分隔关键字。
例如-
@import (less, optional) "custom.css";