天天看點

vsCode修改html預設樣式

1、找到vsCode安裝目錄

按照下面步驟,找到expand檔案夾,找到expand-full.js檔案

D:\vscode\anzhuang\Microsoft VS Code\resources\app\extensions\emmet\node_modules\vscode-emmet-helper\out\expand

vsCode修改html預設樣式

2、打開 用ctrl+f 查找 下面代碼

"!!!": "{<!DOCTYPE html>}",

找到下面代碼塊:

"cmd": "command",

	"ri:d|ri:dpr": "img:s",
	"ri:v|ri:viewport": "img:z",
	"ri:a|ri:art": "pic>src:m+img",
	"ri:t|ri:type": "pic>src:t+img",

	"!!!": "{<!DOCTYPE html>}",
	// "doc": "html[,
	"doc": "html>(head>meta[charset=${charset}]+title{${1:Document}})+body",
	"!|html:5": "!!!+doc",

	"c": "{<!-- ${0} -->}",
	"cc:ie": "{<!--[if IE]>${0}<![endif]-->}",
	"cc:noie": "{<!--[if !IE]><!-->${0}<!--<![endif]-->}"
};

           
vsCode修改html預設樣式

注釋如圖代碼

然後輸入下面代碼:

"doc": "html>(head>meta[charset=${charset}]+title{${1:Document}})+body",
           

儲存重新開機軟體即可

建立html檔案,輸入!+tab 即可出現預設html格式:

vsCode修改html預設樣式

繼續閱讀