less.js不能在chrome中工作 [英] less.js not working in chrome
本文介绍了less.js不能在chrome中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我注意到 less.js 正在工作在firefox但不是在Chrome,还是因为我犯了错误?
< link rel =stylesheet / lesshref =css / style.less/>
< script src =http://lesscss.googlecode.com/files/less-1.0.21.min.js>< / script>
@highlight:#cb1e16;
@ shade1:#cb1e16;
@ tone1:#5c6f7d;
@ grad1:#e6edf3;
@ grad2:#8a8d92;
@ text1:#333e44;
header,footer,section,article,nav,aside {display:block; }
.grad {
background:@ grad2;
background:-moz-linear-gradient(top,@ grad1,@ grad2 1200px);
background:-webkit-gradient(linear,0 0,0 1200,from(#e6edf3),to(#8a8d92));
}
html {
.grad;
min-height:100%;
}
即使我尝试 html {background:red; }
解决方案
在链接中您提供:如果您使用Chrome,Less.js浏览器脚本将无法正常工作,并且由于Chrome出现问题,您的网页路径以file:///开头。 p>
I noticed that less.js is working in firefox but not in Chrome, or is it because I made an error?
<link rel="stylesheet/less" href="css/style.less" />
<script src="http://lesscss.googlecode.com/files/less-1.0.21.min.js"></script>
@highlight: #cb1e16;
@shade1: #cb1e16;
@tone1: #5c6f7d;
@grad1: #e6edf3;
@grad2: #8a8d92;
@text1: #333e44;
header, footer, section, article, nav, aside { display: block; }
.grad {
background: @grad2;
background: -moz-linear-gradient(top, @grad1, @grad2 1200px);
background: -webkit-gradient(linear, 0 0, 0 1200, from(#e6edf3), to(#8a8d92));
}
html {
.grad;
min-height: 100%;
}
even if i try html { background: red; }
it still does not work in chrome am i making a mistake somewhere?
解决方案
From the link you provided : Less.js browser script currently won’t work if you’re using Chrome and the path to your page starts with "file:///" due to a known Chrome issue.
这篇关于less.js不能在chrome中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文