2.使用快捷键ctrl+shift+p搜索settings.json文件,添加以下内容
3.使用
输入!按回车,会自动生成HTML基础结构
settings.json 提示“无法在只读编辑器中修改”
打开设置,搜索要修改的字段,可以直接修改
你这段html代码中的<span></span>部分有问题,主要问题有2个:一是每个div的id名字和属性align写在了一起,我将它们分开了;
二是div标签应由“<”和“>”括起来,每个你都漏写了“>”,我补充上了。
我将整理过的贴上来,经测试可以正常显示:
<span id="Lefttree1_LabelTree" style="display:inline-tableborder-width:0px">您好:num2
<div id=div_10 align=top class=parent >
<img src='.\Images\folderopen.gif'/><a href=#>用户管理</a>
</div>
<div id=div_14 align=top class=child >
<img src='.\Images\folder.gif'/><a href=UserResetPwd.aspx>修改密码</a>
</div>
<div id=div_20 align=top class=parent >
<img src='.\Images\folderopen.gif'/><a href=#>公文管理</a>
</div>
<div id=div_21 align=top class=child >
<img src='.\Images\folder.gif'/><a href=FileList.aspx>公文总览</a>
</div>
<div id=div_22 align=top class=child >
<img src='.\Images\folder.gif'/><a href=FileAdd.aspx>公文起草</a>
</div>
<div id=div_23 align=top class=child >
<img src='.\Images\folder.gif'/><a href=FileBox.aspx>我的公文包</a>
</div>
<div id=div_24 align=top class=child >
<img src='.\Images\folder.gif'/><a href=FileInform.aspx>公文发布</a>
</div>
<div id=div_100 align=top class=child >
<img src='.\Images\folder.gif'/><a href=login.aspx>退出</a>
</div>
</span>
找到该文件并修改\Microsoft VS Code\resources\app\extensions\html\package.json
{"name": "html",
"version": "0.1.0",
"publisher": "vscode",
"engines": { "vscode": "*" },
"contributes": {
"languages": [{
"id": "html",
"extensions": [ ".html", ".htm", ".shtml", ".mdoc", ".jsp", ".asp", ".aspx", ".jshtm",".ejs"],
"aliases": [ "HTML", "htm", "html", "xhtml","ejs"],
"mimetypes": ["text/html", "text/x-jshtm", "text/template", "text/ng-template"]
}],
"grammars": [{
/* "language": "html", not yet enabled*/
"scopeName": "text.html.basic",
"path": "./syntaxes/HTML.plist"
}]
}
}
修改完成后重启vs code试试
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)