IE 无法识别 .less 文件
我创建了一个 less 文件,它在 chrome 和 firefox 中工作正常,但在 IE 9 中甚至无法识别。任何人都可以建议在 IE 9.0 中运行它需要什么。下面是CSS示例..
@import "../core/variables.less"; @import "Mixins.less";
.classname {
@fontweight:bold;
@width:99.9%;
@height:67px;
@color:#D3E2F2;
@icon-width:10px;
@icon-height:10px;
.div-carddropdownbox{
width:90%;
}
.span(@fontweight)
{
font-weight:@fontweight;
}
.span-underline(){
.span(bold);
text-decoration:underline;
}
.span-bold{
.span(bold);
text-decoration:none;
font-size: 15px;
}
.div(@width,@height)
{
float:left;
width:@width;
height:@height;
padding-top: 10px;
padding-bottom: 10px;
}
.div-tracethistransaction
{
.div(100%,100%);
border:1px solid black;
}
.div-servicerequestcharge{
.div(99.9%,67px);
background-color:@color;
border:1px solid black;
}
.div-account
{
.div(99.9%,35px);
background-color:@color;
}
.div-white-blank
{
.div(99.9%,2px);
}
.div-button
{
padding-top:110px;
}
.div-carddelivered
{
.div(100%,45px);
}
.icon(@icon-width,@icon-height)
{
width:@icon-width;
height:@icon-height;
}
.div-icon
{
.icon(20px,20px);
padding-left: 580px;
}
.round-button-cancel {
.rounded-button (7px, #ECECEC, #A9A9A9,none, bold, #52504C,
90px, 35px);
}
.round-button-submit {
.rounded-button (7px, #FAF5E9, #EFAE2C,none, bold, #8B4513,
Auto, 35px);
}
}
I create a less file which is working fine in chrome and firefox, but not even recognising in IE 9. Can anyone please suggest what needed to run it in IE 9.0. below is the css sample..
@import "../core/variables.less"; @import "Mixins.less";
.classname {
@fontweight:bold;
@width:99.9%;
@height:67px;
@color:#D3E2F2;
@icon-width:10px;
@icon-height:10px;
.div-carddropdownbox{
width:90%;
}
.span(@fontweight)
{
font-weight:@fontweight;
}
.span-underline(){
.span(bold);
text-decoration:underline;
}
.span-bold{
.span(bold);
text-decoration:none;
font-size: 15px;
}
.div(@width,@height)
{
float:left;
width:@width;
height:@height;
padding-top: 10px;
padding-bottom: 10px;
}
.div-tracethistransaction
{
.div(100%,100%);
border:1px solid black;
}
.div-servicerequestcharge{
.div(99.9%,67px);
background-color:@color;
border:1px solid black;
}
.div-account
{
.div(99.9%,35px);
background-color:@color;
}
.div-white-blank
{
.div(99.9%,2px);
}
.div-button
{
padding-top:110px;
}
.div-carddelivered
{
.div(100%,45px);
}
.icon(@icon-width,@icon-height)
{
width:@icon-width;
height:@icon-height;
}
.div-icon
{
.icon(20px,20px);
padding-left: 580px;
}
.round-button-cancel {
.rounded-button (7px, #ECECEC, #A9A9A9,none, bold, #52504C,
90px, 35px);
}
.round-button-submit {
.rounded-button (7px, #FAF5E9, #EFAE2C,none, bold, #8B4513,
Auto, 35px);
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
检查LESS站点,它说不支持IE。没有一个版本。
Check the LESS site, it says that it doesn't support IE. None of its versions.
确保包含 less.js 脚本。需要解析较少的文件。
http://lesscss.org/
如果这是一个 .NET 项目,并且您不想使用 less。如果您使用 Node.js(对于较大的 .less 文件,这可能会增加客户端的开销),您可以将 DotLess 库添加到您的项目中。
http://www.dotlesscss.org/
Make sure you're including the less.js script. It's needed to parse less files.
http://lesscss.org/
If this is a .NET project, and you don't want to use less.js (which can add overhead on the client-side for larger .less files), you could add the DotLess library to your project.
http://www.dotlesscss.org/
我遇到了同样的问题。我只是将其编译为
.css
文件并引用该文件进行实时测试,包括 IE。I've run into the same issue. I simply compile it into a
.css
file and reference that for live testing, including IE.