[英]Is it possible to inline LESS stylesheets?
For example, is it possible to do something like: 例如,是否可以执行以下操作:
<style type="text/less">
#foo {
.bar {
font-weight: bold;
}
}
</style>
You actually need to use 你实际上需要使用
<style type="text/less">
instead of: 代替:
<style type="stylesheet/less">
Otherwise it won't work. 否则它将无法工作。
Remember to place the <style>
element before the <script>
element to load less.js. 请记住将
<style>
元素放在<script>
元素之前以加载less.js.
This has been possible since July 2010, and it works with today's Less 1.2.0 version. 这可以从2010年7月开始实现,并且适用于今天的Less 1.2.0版本。
See the initial diff that added support for this . 查看增加对此的支持的初始差异 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.