vscode配置html模板vs code 配置html模板
1. 到配置位置
⾸选项 - ⽤户代码⽚段 - 输⼊html.json
2. 写⼊代码段
// html.json
{
// Place your snippets for html here. Each snippet is defined under a snippet name and has a prefix, body and
学校网站免费html模板// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
/
/ same ids are connected.
// Example:
// "Print to console": {
//  "prefix": "log",
//  "body": [
//  "console.log('$1');",
//  "$2"
//  ],
//  "description": "Log output to console"
// }
"html5 demo": {
"prefix": "!5",  // 这个是你输⼊的快捷代码
"body": [// 这⾥是插⼊的内容
"<!DOCTYPE html>",
"<html lang='en'>",
"<head>",
"\t<meta charset='UTF-8'>",
"\t<meta name='referrer' content='always'>",
"\t<meta name='author' content='qiphon'>",
"\t<meta name='robots' content='none'>",
"\t<meta name='keywords' content=''>",
"\t<meta name='description' content=''>",
"\t<meta name='renderer' content='webkit'>",
"\t<meta name='revisit-after' content='7 days' >",
"\t<meta http-equiv=widow-target Content=_top>",
"\t<meta name='viewport' content='width=device-width, initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no, shrink-to-fit=no' viewport -fit=cover />",
"\t<meta http-equiv='X-UA-Compatible' content='ie=edge,chrome=1'>",
"\t<title>$1</title>",  // 光标⾸次会在$1 的地⽅,按tab 会跳到 $2
"\t<style>",
"\t\t *{",
"\t\t\tmargin:0;",
"\t\t\tpadding:0;",
"\t\t\tbox-sizing:border-box;",
"\t\t\t-webkit-tap-highlight-color:transparent;",
"\t\t}",
"\t</style>",
"</head>",
"<body>",
"\t$2",
"</body></html>"
],
"description": "html5 专⽤ create by qiphon"  // 这⾥是你的快捷输⼊的时候 VS code 提⽰的⽂字
}
}
感谢⽹友

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。