本文介绍了"@include"的含义是什么?在.css文件中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不明白,.css文件中@include标记的含义是什么.例如:
I don't understand , what is the meaning of the @include tag in .css files.For Example :
.wrapper {
display: flex;
width: 100%;
@include display(flex);
@include flex-direction(column);
@include align-items(center);
@include justify-content(center);
@include transition(all 2s linear);
}
推荐答案
@include
s是SCSS的一部分,称为Mixin.这是一个示例:
@include
s are a part of SCSS, it's called Mixin. Here is an example:
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
border-radius: $radius;
}
.box { @include border-radius(10px); }
@include
是存储特别是诸如供应商前缀之类的东西的快捷方式.上面的CSS输出将是:
@include
s are a shortcut to storing especially things like vendor prefixes. The CSS output of the above will be:
.box {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-ms-border-radius: 10px;
border-radius: 10px;
}
这篇关于"@include"的含义是什么?在.css文件中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!