gpt4 book ai didi

css - LESS @import 似乎不起作用

转载 作者:太空宇宙 更新时间:2023-11-04 09:06:51 27 4
gpt4 key购买 nike

使用命令行程序lessc installed by following this guide在 Ubuntu 机器上,似乎没有像我预期的那样编译 @import 规则。

$ echo '@import "inc.less"' > test.less
$ echo 'body { background: pink }' > inc.less
$ lessc test.less

输出是一个空行。我期待 inc.less 的内容。我在这里做错了什么吗?

最佳答案

试试 @import "inc";

不要使用 .less 扩展名。我还认为您需要一个分号。

例如,这里有几行对我有用:

@import "blueprint/screen";
@import "blueprint/ie";

a, a:link, a:visited, a:hover, a:active
{
text-decoration:none;
color:#FF0000;
}

这会将 blueprint/screen.lessblueprint/ie.less 导入到文件中。

关于css - LESS @import 似乎不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9362439/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com