Remove gray bg behind the tabs in JFX

前端 未结 3 1476
耶瑟儿~
耶瑟儿~ 2021-02-18 19:16

So is there any way to remove the gray area behind the tab(s): \"example\"

I\'ve tried to do this with CSS, but di

3条回答
  •  情书的邮戳
    2021-02-18 19:27

    JavaFX has a built-in default CSS sheet named caspian.css. Please read this post: https://stackoverflow.com/a/10149050/682495.
    To change the default CSS, add this selector to your CSS file and customize it:

    .tab-pane *.tab-header-background {
        -fx-background-color: -fx-outer-border, -fx-inner-border, derive(-fx-color, -20%);
        -fx-effect: innershadow(two-pass-box , rgba(0,0,0,0.6) , 4, 0.0 , 0 , 0);
    }
    

提交回复
热议问题