JavaFX ProgressBar进度条的颜色设置

.progress-bar {
    -fx-indeterminate-bar-length: 60;
    -fx-indeterminate-bar-escape: true;
    -fx-indeterminate-bar-flip: true;
    -fx-indeterminate-bar-animation-time: 2;
}
/*进度条颜色*/
.progress-bar > .bar {
    -fx-background-color: #37C796;
    -fx-background-insets: 3 3 4 3;
    -fx-background-radius: 2;
    -fx-padding: 0.75em;
}
.progress-bar:indeterminate > .bar {
    -fx-background-color: linear-gradient(to left, transparent, -fx-accent);
}
/*背景*/
.progress-bar > .track {
    -fx-background-color:#292E48;
    /*-fx-background-insets: 0, 0 0 1 0, 1 1 2 1;*/
    /*-fx-background-radius: 4, 3, 2;*/
}

你可能感兴趣的:(JavaFX ProgressBar进度条的颜色设置)