我需要添加一个新类型( case "linear-gradient":
)这个代码,但不知道如何。
这段代码用于条纹。
代码块:
case "stripes":
value = `repeating-linear-gradient( ${background.angle}, ${background.colors
.flatMap((color, i) => {
return [`${color} ${i * background.width}px`, `${color} ${(i + 1) * background.width}px`];
})
.join(", ")})`;
break;
例如:
backgrounds: {
skillbar: {
type: "stripes",
angle: "45deg",
colors: ["#ff5555", "#ffffff"],
width: 10,
},
maxedbar: {
type: "stripes",
angle: "45deg",
colors: ["#ff4e2a", "#fdbb3c"],
width: 10,
},
},
暂无答案!
目前还没有任何答案,快来回答吧!