[英]Change Expanded Titled Pane Background in JavaFx
I have an accordion with few titled pane.我有一个带有几个标题窗格的手风琴。 I want to change the background color of the titled pane when expanded.
我想在展开时更改标题窗格的背景颜色。 The default color seems to be white.
默认颜色似乎是白色。 How do I change it to black?
如何将其更改为黑色?
I've tried this css but it does not work.我试过这个 css 但它不起作用。
.titled-pane > *.content {
-fx-background-color: black;
-fx-border-color: black;
}
Try this尝试这个
.titled-pane > .title {
-fx-background-color: #000000;
-fx-background-insets: 0;
}
.titled-pane > .title > *.text {
-fx-fill: #fff;
}
.titled-pane > .content {
-fx-background-color: #000000;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.