//这里是一些简单的less语法@width:400px;@height:300px;@font_size:12px;@bgcolor: #000;textarea { width:@width; height:@height; font-size :@font_size; background-color : @bgcolor; } .frame { .fun(123px); background-color: @bgcolor; .select { width: 100px } } .fun(@px) { height: @px }
编译成 css 后的代码为
textarea { width: 400px; height: 300px; font-size: 12px; background-color: #000000; }.frame { height: 123px; background-color: #000000; }.frame .select { width: 100px; }
相信看了本文案例你已经掌握了方法,更多精彩请关注其它相关文章!
相关阅读:
rxjs的使用详解
js-xlsx的工具类库xlsxutils的使用详解
javascript怎样做出决策树
以上就是less简单实用的案列的详细内容。