美文网首页JavaFX
JavaFX ProgressBar进度条的颜色设置

JavaFX ProgressBar进度条的颜色设置

作者: 洞链 | 来源:发表于2019-10-09 16:30 被阅读0次
    .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进度条的颜色设置

        本文链接:https://www.haomeiwen.com/subject/oifhpctx.html