@nice-blue: #5B83AD; @light-blue: @nice-blue + #111; @font-size: 18px; #header { color: @light-blue; font-size: @font-size; } @height: 0.5; @size: 10px+10; @color: #666 + 111; #header2 { color: @color; height: percentage(@height); //0.5->50% font-size: saturate(@size,10%); //å¢å 10%饱å度 background-color: spin(lighten(@color, 25%), 10); //é¢è²äº®åº¦éä½25%,å¹¶ä¸è²ç¸å¼å¢å 10 } .my-mixin { color: black; } //å®ä¹ä¸ä¸ªæ··åæ¹æ³ï¼æ³ä½¿ç¨çæ¶ååå»è§¦å .my-other-mixin() { background: white; } .my-font-mixin { font-size: 20px; } .cat, #wscat { background-color: aquamarine; } #header3 { .my-mixin; .my-other-mixin; //å¯ä»¥çç¥æ¬å· //.my-other-mixin()//å½ç¶ä¹å¯ä»¥è¿æ · .my-font-mixin(); #wscat; //.cat()//ä¸ä¸ä¸¤ç§æ¹æ³é½å¯ä»¥ } #header4 { color: black; } #header4 .navigation { font-size: 12px; } #header4 .logo { width: 300px; } #header4 { color: black; .navigation { font-size: 12px; } .logo { width: 300px; } &:before { content: "ä½ å¥½"; } &-wsscat { background-color: bisque; } } @var: white; #header5 { @var: red; #logo { color: @var; // red } } .bg(@color, @size) { background-color: @color; font-size: @size; } .background{ .bg(#555555,16px) }