本文轉載自https://blog.csdn.net/yukinoai/article/details/84564949
1.以管理員身份運行VS Code,安裝background插件
2.打開setting,在搜索框中輸入background,選擇擴展中的plugin background,選擇在setting.json中編輯
3.在用戶設置中輸入以下代碼,修改完后保存,會提示重啟VS Code,點擊確定后即可完成修改
//background 的相關配置
"update.enableWindowsBackgroundUpdates": true,
"background.customImages": [
"file:///F:/Picture/Yukino/vs_background.png"//圖片地址
],
"background.style": {
"content":"''",
"pointer-events":"none",
"position":"absolute",//圖片位置
"width":"100%",
"height":"100%",
"z-index":"99999",
"background.repeat":"no-repeat",
"background-size":"25%,25%",//圖片大小
"opacity":0.2 //透明度
},
"background.useFront": true,
"background.useDefault": false,//是否使用默認圖片
我用的背景圖片是這個:
效果如下::