我对Adaptive.js及其与 LESS 的兼容性有疑问。问题是您无法在头部指定文档的类型,因为您必须通过 js 包含它。
<script>
// Edit to suit your needs.
var ADAPT_CONFIG = {
// Where is your CSS?
path: 'css/responsive/',
// false = Only run once, when page first loads.
// true = Change on window resize and page tilt.
dynamic: true,
// First range entry is the minimum.
// Last range entry is the maximum.
// Separate ranges by "to" keyword.
range: [
'0px to 760px = mobile.min.css',
'760px to 980px = 720.min.css',
'980px to 3000px = 960.min.css',
]
};
</script>
我的问题是有没有办法告诉adaptive.js文件应该作为更少的文件提供,所以:
<script type="text/less">
而不仅仅是:
<script type="text/stylesheet">
还是我必须在adaptive.js 生效之前提供CSS 服务器端?
任何帮助都会很棒。