|
|
@@ -104,6 +104,28 @@ ul {
|
|
|
font-weight: 700;
|
|
|
}
|
|
|
|
|
|
+// 函数
|
|
|
+@function getWidth($x) {
|
|
|
+ @return $x * 2;
|
|
|
+}
|
|
|
+
|
|
|
+/*
|
|
|
+ 声明:
|
|
|
+ @function xx(形参) {
|
|
|
+ @return 表达式;
|
|
|
+ }
|
|
|
+ 使用:
|
|
|
+ #{函数名(实参)}
|
|
|
+*/
|
|
|
+
|
|
|
+
|
|
|
.one {
|
|
|
- @extend %yy;
|
|
|
-}
|
|
|
+ width: #{getWidth(300)}px;
|
|
|
+ // height: 300px+200px; 单位统一
|
|
|
+ // height: 600px - 300px; 减法前后加空格
|
|
|
+ // height: 300px * 2; 只允许一个数值有单位
|
|
|
+ height: (600px/2); //需要添加括号
|
|
|
+ // @extend %yy;
|
|
|
+ color: #0ff + #ff0; //分段运算
|
|
|
+ border: 2px solid #00f;
|
|
|
+}
|