码迷,mamicode.com
首页 > 其他好文 > 详细

emmet前端模板

时间:2018-01-31 11:31:28      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:chrome   min   body   https   移动端   charset   htm   不显示   浏览器   

{
    // Custom snippets definitions, as per https://github.com/emmetio/emmet/blob/master/snippets.json
    "snippets": {
        "html": {
            "snippets": {
                "boilerplate":"<!--[if lt IE 7]>      <html class=\"no-js lt-ie9 lt-ie8 lt-ie7\"> <![endif]-->\n<!--[if IE 7]>  <html class=\"no-js lt-ie9 lt-ie8\"> <![endif]-->\n<!--[if IE 8]>         <html class=\"no-js lt-ie9\"> <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\"> <!--<![endif]-->\n",

            },
            "abbreviations": {
                "myfavicon": "<link rel=\"shortcut icon\" type=\"image/ico\" href=\"\" />",
                "myviewport": "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /> <!--移动端视图--> ",
                "360compat": "<meta name=\"renderer\" content=\"webkit\" />",
                "mykeywords": "<meta name=\"keywords\" content=\"ajanuw\" /> <!--关键词--> ",
                "mydesc": "<meta name=\"description\" content=\"ajanuw, b,c\" /> <!--网站内容描述--> ",
                "meta0": "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />",
                "meta1": "<meta http-equiv=\"Pragma\" content=\"no-cache\" /> <!--禁止浏览器从本地计算机的缓存中访问页面内容-->",
                "meta2": "<meta http-equiv=\"Window-target\" content=\"_top\" /> <!--强制页面在当前窗口以独立页面显示-->",
                "meta3": "<meta http-equiv=\"content-Type\" content=\"text/html;charset=utf-8\" />  <!--显示字符集的设定-->",
                "meta4": "<meta http-equiv=\"Content-Language\" content=\"zh-cn\"/>   <!--显示语言的设定-->",
                "meta5": "<meta http-equiv=\"imagetoolbar\" content=\"false\" />  <!--指定是否显示图片工具栏,false不显示,true显示-->",

                "meta6": "<link rel=\"icon\" sizes=\"192x192\" href=\"https://pic.cnblogs.com/avatar/1053296/20171128213246.png\" /> <!-- icon in the highest resolution we need it for -->",
                "meta7": "<link rel=\"apple-touch-icon\" href=\"https://pic.cnblogs.com/avatar/1053296/20171128213246.png\" />  
    <!-- reuse same icon for Safari -->",
                "meta8": "<meta name=\"msapplication-square310x310logo\" content=\"https://pic.cnblogs.com/avatar/1053296/20171128213246.png\" />    <!-- multiple icons for IE -->",
               "meta9": "<meta name=\"theme-color\" content=\"#ff4081\" />   <!-- Chrome, Firefox OS and Opera -->",
               "meta10": "<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\" />   <!-- Chrome, Firefox OS and Opera -->",

               "meta11": " <link rel=\"apple-touch-startup-image\" href=\"https://pic.cnblogs.com/avatar/1053296/20171128213246.png\" />    <!--Safari 显示独特的启动图像, 图像必须为目标设备屏幕的特定尺寸-->",

                "bscss4":"<link rel=\"stylesheet\" href=\"https://cdn.bootcss.com/bootstrap/4.0.0-beta/css/bootstrap.min.css\"/>",
                "mduicss":"<link href=\"https://cdn.bootcss.com/mdui/0.3.0/css/mdui.min.css\" rel=\"stylesheet\"/>",

          "xhr":"<script src=\"https://cdn.bootcss.com/axios/0.17.1/axios.min.js\"></script>",
                "mduijs":"<script src=\"https://cdn.bootcss.com/mdui/0.3.0/js/mdui.min.js\"></script>",
                "vue2":"<script src=\"https://cdn.bootcss.com/vue/2.4.4/vue.min.js\"></script>",
                "vueRouter":"<script src=\"https://cdn.bootcss.com/vue-router/2.7.0/vue-router.min.js\"></script>",
                "avalon":"<script src=\"https://cdn.bootcss.com/avalon.js/2.2.7/avalon.js\"></script>",
                "jq2":"<script src=\"http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js\"></script>",
          "lodash":"<script src=\"https://cdn.bootcss.com/lodash.js/4.17.4/lodash.js\"></script>",
                "metas":"myfavicon+myviewport+360compat+mykeywords+mydesc+meta0+meta1+meta2+meta3+meta4+meta5++meta6++meta7+meta8+meta9+meta10+meta11 \n",
                "csses":"bscss4+mduicss \n",
                "jses":"mduijs+vue2+avalon \n",
                "mydoc": "boilerplate>html>(head>meta[charset='utf-8']+title{${1:ajanuw}}+metas+csses)+body>{\n <!--[if lt IE 8]>  <h3>请升级你的浏览器,或更换主浏览器!!!</h3>  <![endif]-->}+jses",
                "!!ht": "!!!+mydoc[lang='zh-cmn-Hans']"
            }
        }
    }
}

atom编辑器 配置https://segmentfault.com/a/1190000005935623
C:\Users\Administrator.atom\packages\emmet\node_modules\emmet\lib\snippets.json 打开这个文件
改更上面对应键值对 复制粘贴进去

重启 atom !!ht + tab生成模板

emmet前端模板

标签:chrome   min   body   https   移动端   charset   htm   不显示   浏览器   

原文地址:https://www.cnblogs.com/ajanuw/p/8390427.html

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