我想修改此代码并使进度条变为绿色:
.progress-bar > .bar {
-fx-background-color: linear-gradient(
from 0px .75em to .75em 0px,
repeat,
-fx-accent 0%,
-fx-accent 49%,
derive(-fx-accent, 30%) 50%,
derive(-fx-accent, 30%) 99%
);
}
如何修改代码以更改可视布局?
答案 0 :(得分:2)
只需覆盖颜色常量-fx-accent
,渐变颜色源自:
.progress-bar > .bar {
-fx-accent: green;
-fx-background-color: linear-gradient(
from 0px .75em to .75em 0px,
repeat,
-fx-accent 0%,
-fx-accent 49%,
derive(-fx-accent, 30%) 50%,
derive(-fx-accent, 30%) 99%
);
}