项目中使用less:
1、子页面自定义引入变量less
2、再style标签之后引用less.js
<link rel="stylesheet/less" href="static/skin/lte/css/main.css">//main.less 生成的样式
<style type="text/less" >
@import "static/skin/lte/css/variable.less";
.navbar-inverse{
background:@test-red;
}
</style>
<script src="static/plugins/lessjs/less.js"></script>