- 在
vscode
的扩展
里,搜索background
插件,然后点击下载;也可以使用快捷键 ctrl + shift + x
打开扩展 - 下载完成后,就已经默认有了背景图了;如果不喜欢默认背景图的话,可以设置自己喜欢的图片作为背景图;操作如下:
打开文件-首选项-设置,添加如下代码:
"background.enabled": true,
"background.useDefault": false,
"background.customImages": [
"file:///C:/Users/Acer/Pictures/xw.png"
],
"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.2
},
"diffEditor.ignoreTrimWhitespace": false,
"security.workspace.trust.untrustedFiles": "open",
"explorer.confirmDelete": false
- 根据自己喜好进行设置,设置完成以后如果没有改变,可关闭重新打开
vscode
即可。