删除JFX中标签后面的灰色bg [英] Remove gray bg behind the tabs in JFX

查看:166
本文介绍了删除JFX中标签后面的灰色bg的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法删除标签后面的灰色区域:

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

我试图用CSS做这个,但没找到。

I've tried to do this with CSS, but didn't find how.

推荐答案

JavaFX有一个名为caspian.css的内置默认CSS表。请阅读这篇文章: https://stackoverflow.com/a/10149050/682495

要更改默认CSS,请将此选择器添加到CSS文件并进行自定义:

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);
}

这篇关于删除JFX中标签后面的灰色bg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆