第一步:下载安装扩展文件background
第二步:点击文件—首选项—设置
搜索background,并点击background-style的settings.json文件
添加如下代码:
{
"workbench.iconTheme": "vscode-icons",
"background.enabled": true,
"background.useDefault": false,
"background.customImages": [
"file:///D:/Pictures/1.jpg"
//图片地址,存放的图片的位置
],
"background.style": {
"content": "''",
"pointer-events": "none",
"position": "absolute",
"z-index": "99999",
"width": "100%",
"height": "100%",
"background-position": "center",
"background-repeat": "no-repeat",
"background-size": "100%,100%",
"opacity": 0.3
}
}
效果如下