vscode如何设置html模板

2021-02-01 17:17

阅读:681

标签: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>",
            "\t\tmeta charset=\"UTF-8\">",
            "\t\t
=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0\">",
            "\t\t
<span>></span>Document<span></span><span>title</span><span>></span><span>",
            "\t\t</span><span><span>link </span><span>rel</span><span>=\"stylesheet\" </span><span>type</span><span>=\"text/css\" </span><span>href</span><span>=\"\" </span><span>/></span><span>",
            "\t</span><span></span><span>head</span><span>></span><span>",
            "\t</span><span><span>style </span><span>type</span><span>=\"text/css\">",
            </span><span>"\t<span>></span><span>\n",
            "\t</span><span></span><span>body</span><span>></span><span>",
            "\t</span><span><span>script </span><span>src</span><span>=\"\" </span><span>type</span><span>=\"text/javascript\" </span><span>charset</span><span>=\"utf-8\">",
            </span><span>"</span><span>></span><span>"
        ],
        "description": "HT-H5" //模板的描述 
    }
}</span></span></span></span></span>

 

vscode如何设置html模板

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

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


评论


亲,登录后才可以留言!