IE 无法识别 .less 文件

发布于 2024-12-07 20:57:47 字数 1777 浏览 1 评论 0原文

我创建了一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

眼眸里的快感 2024-12-14 20:57:47

检查LESS站点,它说不支持IE。没有一个版本。

Check the LESS site, it says that it doesn't support IE. None of its versions.

荭秂 2024-12-14 20:57:47

确保包含 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/

哭了丶谁疼 2024-12-14 20:57:47

我遇到了同样的问题。我只是将其编译为 .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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文