📜  LESS-变量

📅  最后修改于: 2020-10-22 07:07:50             🧑  作者: Mango


 

在本章中,我们将讨论LESS中的变量。 LESS允许使用@符号定义变量变量分配是通过冒号(:)完成的

下表详细说明了LESS变量的用法。

Sr.No. Variables usage & Description
1 Overview

Repetition of same value many times can be avoided by the use of variables.

2 Variable Interpolation

The variables can also be used in other places like selector names, property names, URLs and @import statements.

3 Variable Names

We can define variables with a variable name consisting of a value.

4 Lazy Loading

In lazy loading, variables can be used even when they are not.

5 Default Variables

Default variable has an ability to set a variable only when it is not already set. This feature is not required because variables can be easily overridden by defining them afterwards.