shalldie/vscode-background

我想知道要如何设置styles可以单独指定每个图片的样式?

T-422 opened this issue · 4 comments

T-422 commented

"background.fullscreen": {
"image": [
"file:///D:/WoNiuFE/Web/素材/images/01.png",
"file:///D:/WoNiuFE/Web/素材/images/02.png",
"file:///D:/WoNiuFE/Web/素材/images/03.jpg",
"file:///D:/WoNiuFE/Web/素材/images/04.png",
"file:///D:/WoNiuFE/Web/素材/images/05.png",
"file:///D:/WoNiuFE/Web/素材/images/06.png"
],
"styles": [
{
"position": "right",
},
{},
{},
{},
{},
{}
],
"opacity": 0.9,
"size": "contain",
"position": "center",
"interval": 3600
},

比如这段设置中 styles中的position设置是不生效的
我该如何设置?

每个配置项都必须是合法的 CSS, position: right 不是合法的, 当然不会生效.

T-422 commented

"background.fullscreen": {
"image": [
"file:///D:/WoNiuFE/Web/素材/images/01.png",
"file:///D:/WoNiuFE/Web/素材/images/02.png",
"file:///D:/WoNiuFE/Web/素材/images/03.jpg",
"file:///D:/WoNiuFE/Web/素材/images/04.png",
"file:///D:/WoNiuFE/Web/素材/images/05.png",
"file:///D:/WoNiuFE/Web/素材/images/06.png"
],
"styles": [
{
"width": "30px"
},
{},
{},
{},
{},
{}
],
"opacity": 0.9,
// "size": "contain",
"position": "center",
"interval": 3600
},
那这样子为什么也不生效呢))

background.fullscreen 是为了全屏背景特化的选项, 仅提供有限的配置项.
如果你需要调整大小, 请使用 background.fullscreen.size, 文档: https://github.com/shalldie/vscode-background#fullscreen-config
如果希望背景图的自定义, 请使用基本功能: https://github.com/shalldie/vscode-background#default-config

T-422 commented

懂了!
谢谢谢谢