微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

css – 不能得到less.js工作

我不能得到less.js的工作,我不知道为什么。我曾尝试过的HTML
<!DOCTYPE HTML>
<html lang="en">
    <head>
        <Meta charset="utf-8" />

        <!-- CSS -->
        <link rel="stylesheet/less"  href="main.less" />

        <!-- Javascript -->
        <!-- <script src="http://lesscss.googlecode.com/files/less-1.0.18.min.js"></script> -->
        <script src="less-1.0.18.min.js" type="text/javascript"></script>

    </head>
    <body>
        <p>
            Lorum ipsum
        </p>
    </body>
</html>

而且,

p {
    color: blue;
}

较少的1.0.18.min.js文件http://lesscss.googlecode.com/files/less-1.0.18.min.js下载。所有文件在同一个文件夹中。我不知道为什么这不工作

在Chrome 12.0.742.100中测试

编辑

尝试了lates less.js文件(less-1.1.3.min.js)。那一个也没有工作。

好吧现在…

这样做:

<link rel="stylesheet" type="text/less" href="main.less" />

但只有正常的css,没有比较具体的加价。

这根本不起作用:

<link rel="stylesheet/less" type="text/less" href="main.less" />

此外,这不工作:

<link rel="stylesheet/less" type="text/css" href="main.less" />

我勒个去?如何减少工作量?

发现错误

P.S.S. 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.

Soruce

解决方法

P.S.S. 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.

但是我们可以做的是使用wamp(pc)或mamap(mac)设置本地测试环境。那就行了。

原文地址:https://www.jb51.cc/css/218443.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。