1.应用扩展搜索:background,
2.安装,
3.配置settings.json,直接复制代码如下:
{
"security.workspace.trust.untrustedFiles": "open",
"background.customImages": [
"file:///D:/我的第一个demo/image/t0178a89e71467b9f54.jpg"
],
"background.enabled": true,
"background.useDefault":false, //不使用默认背景图
"background.style": { //样式配置
"content": "''",
"pointer-events": "none",
"position": "absolute",
"z-index": "99999",
// "top":"0",
//"left":"0",
"width": "100%",
"height": "100%",
"background-position": "center",
"background-repeat": "no-repeat",
"background-size":"100%,100%",
"opacity": 0.1,
// "background-size": "100%",
},
"editor.fontLigatures": false,
}
注意:图片路径手动输入