less沒有起作用
index.html:
<!DOCTYPE html>
<html>
?? ?<head>
?? ??? ?<meta charset="utf-8">
?? ??? ?<title></title>
?? ?</head>
?? ?<body>
?? ??? ?<h1>aaaaa</h1>
?? ??? ?<div class="main">
?? ??? ??? ?<img src='g1.gif' />
?? ??? ??? ?<img src="g2.gif"/>
?? ??? ?</div>
?? ?</body>
</html>
index.less
h1{
?? ?color: red;
}
h1顏色依舊是黑色
less的package.json:
{
?? ?"name": "less",
?? ?"id": "compile-less",
?? ?"version": "1.0.1-2018103019",
?? ?"external": {
?? ??? ?"type": "node",
?? ??? ?"programPath": "${pluginPath}",
?? ??? ?"executable": "/node_modules/.bin/lessc",
?? ??? ?"programName": "less",
?? ??? ?"commands": [
?? ??? ??? ?{
?? ??? ??? ??? ?"id": "LESS_COMPILE",
?? ??? ??? ??? ?"name": "編譯less",
?? ??? ??? ??? ?"command": [
?? ??? ??? ??? ??? ?"${programPath}",
?? ??? ??? ??? ??? ?"${file}",
?? ??? ??? ??? ??? ?"${fileBasename}.css"
?? ??? ??? ??? ?],
?? ??? ??? ??? ?"extensions": "less",
?? ??? ??? ??? ?"key": "",
?? ??? ??? ??? ?"showInParentMenu": false,
?? ??? ??? ??? ?"onDidSaveExecution": true
?? ??? ??? ?}
?? ??? ?]
?? ?},
?? ?"dependencies": {
?? ??? ?"less": "^3.0.2"
?? ?},
?? ?"extensionDependencies": [
?? ??? ?"npm"
?? ?],
?? ?"description": "less插件用于less文件編譯"
}
是需要設(shè)置什么嗎?
2019-08-12
你的HTML文件沒有引用樣式文件