码迷,mamicode.com
首页 > Web开发 > 详细

vscode如何设置html模板

时间:2020-06-22 18:43:17      阅读:124      评论:0      收藏:0      [点我收藏+]

标签:scale   viewport   选项   css   ble   $1   efi   fine   Fix   

文件->首选项->用户片段;搜索html.json;以下是一个标准的HTML模板。

{
    // Place your snippets for html here. Each snippet is defined under a snippet name and has a prefix, body and 
    // 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 index": {
        "prefix": "index", //模板的快捷键
        "body": [
            "<!DOCTYPE html>",
            "<html lang=\"en\">",
            "\t<head>",
            "\t\t<meta charset=\"UTF-8\">",
            "\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0\">",
            "\t\t<title>Document</title>",
            "\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"\" />",
            "\t</head>",
            "\t<style type=\"text/css\"></style>",
            "\t<body>\n",
            "\t</body>",
            "\t<script src=\"\" type=\"text/javascript\" charset=\"utf-8\"></script>",
            "</html>"
        ],
        "description": "HT-H5" //模板的描述 
    }
}

 

vscode如何设置html模板

标签:scale   viewport   选项   css   ble   $1   efi   fine   Fix   

原文地址:https://www.cnblogs.com/antao/p/13178178.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!