【发布时间】:2013-01-28 15:26:20
【问题描述】:
我有 css 样式类:
.customTabPane {
-fx-tab-min-height: 20;
}
.customTabPane:top *.tab-header-area {
-fx-background-insets: 0, 0 0 1 0;
-fx-padding: 5 0 0 0;
}
.customTabPane:top *.tab {
-fx-padding: 0 0 0 0;
}
.customTabPane *.tab-header-background {
-fx-background-color: red;
}
但是 *.tab-header-area, *.tab-header-background 适用于应用程序中的所有 TabPane-s,而不仅仅是“customTabPane” (tabPane.getStyleClass().add("customTabPane"))。我该如何解决这个问题?
【问题讨论】: