node.js是一个前端的框架 自带一个包管理工具npm
官网:
test.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <link rel="stylesheet" href="style.css"/> </head> <body> <div id="box"> <ul> <li>你好</li> <li>hello</li> </ul> </div> </body> </html>
style.less
#box{ width:200px; height:200px; background-color:blue; ul{ color:white; li{ line-height:50px; } } }
@red:red; @w:200px; #big{ width:@w; height:@w; background-color:@red; #small{ width:@w; height:@w; background-color:@red; } } p{ color:@red; }
.bt{ width:200px; height:200px; border-top:2px solid red; background-color:red; } #big{ .bt; #small{ .bt; } }
#box{ width:100%; height:60px; background-color:#ccc; h3{ width:100%; height:20px; background-color:yellow; } ul{ list-style:none; li{ height:40px; line-height:40px; float:left; padding:0 10px; } } }
@color:#333; #box{ width:100%; height:60px; background-color:@color+#111; }
@var:50vh/2; #box{ width:calc(50% + (@var - 20px)); }
@base:#f04615; @width:0.5; #box{ width:percentage(@width); color:saturate(@base,5%); background-color:spin(lighten(@base,25%),8); }
//单行注释// /*多行 注释*/
@import "other.less";
如对本文有疑问, 点击进行留言回复!!
网友评论