1、打开vscode 安装一下拓展
2、加载完成以后,打开首选项设置页面,在里面搜background;
然后把一下代码粘贴上去
注:background.customImages为你图片的路径,也可设置颜色
{
"editor.wordWrapColumn":0,
"html.format.wrapAttributes": "auto",
"editor.wordWrap": "on",
"update.enableWindowsBackgroundUpdates": true,
"background.customImages": ["file:///D:/VScode/background_vscode/A.png"],
"background.enabled": true,
"background.style": {
"content": "''",
"pointer-events": "none",
"position": "absolute",
"z-index": "99999",
"width": "100%",
"height": "100%",
"background-position": "center",
"background-repeat": "no-repeat",
"background-attachment":"fixed",
" background-size": "cover",
"opacity": 0.32
},
"background.useFront": true,
"background.useDefault": false
}