官方选项地址:http://lesscss.cn/usage/#using-less-in-the-browser-setting-options
(不建议在客户端使用,最好还是预编译比较好,当然这是相对的)
<!-- 引入less --> <link rel="stylesheet/less" type="text/css" href="../css/style.less"/> <!-- 引入编译器js --> <script src="../js/less.min.js" type="text/javascript"></script>
设置less 编译选项(选项地址最上方),可以在link链中定义less变量(参考官网)
<script> less = { env: "development", async: false, fileAsync: false, poll: 1000, functions: {}, dumpLineNumbers: "comments", relativeUrls: false, rootpath: ":/a.com/" }; </script>