我可以使用CSS删除JavaFX Modena中选项卡下方的灰色边框吗?

时间:2022-01-14 17:00:18

Basically, I'm trying to remove the grey line below the tabs so it appears flat (lol, ignore bad Spanish translations - I'm currently working on fixing the bundles): 我可以使用CSS删除JavaFX Modena中选项卡下方的灰色边框吗?

基本上,我正在尝试删除选项卡下方的灰色线条,使其看起来平坦(大声笑,忽略不良的西班牙语翻译 - 我正在努力修复捆绑包):

I've tried -fx-padding: 0; and -fx-border-width: 0; on various tab-related components.

我试过-fx-padding:0;和-fx-border-width:0;在各种与标签相关的组件上。

Thanks.

1 个解决方案

#1


2  

This line is the background insets of the tab header region.

此行是选项卡标题区域的背景插入。

You can solve this by putting this in your stylesheet:

您可以通过将其放在样式表中来解决此问题:

.tab-pane:top > .tab-header-area > .tab-header-background {
  -fx-background-insets: 0, 0 0 0 0, 0;
}

#1


2  

This line is the background insets of the tab header region.

此行是选项卡标题区域的背景插入。

You can solve this by putting this in your stylesheet:

您可以通过将其放在样式表中来解决此问题:

.tab-pane:top > .tab-header-area > .tab-header-background {
  -fx-background-insets: 0, 0 0 0 0, 0;
}