[英]JavafX set tabpane colour with css
Two problems: 两个问题:
https://drive.google.com/file/d/0B_YEgxccklmHSC1BcTdULWJUUFk/view?usp=sharing https://drive.google.com/file/d/0B_YEgxccklmHSC1BcTdULWJUUFk/view?usp=sharing
https://drive.google.com/file/d/0B_YEgxccklmHZ0d2VDFZYUVDc1E/view?usp=sharing https://drive.google.com/file/d/0B_YEgxccklmHZ0d2VDFZYUVDc1E/view?usp=sharing
https://drive.google.com/file/d/0B_YEgxccklmHZ1RFNHNlY1pYTGc/view?usp=sharing https://drive.google.com/file/d/0B_YEgxccklmHZ1RFNHNlY1pYTGc/view?usp=sharing
Any help appreciated. 任何帮助表示赞赏。
Thx! 谢谢!
Regarding 2.) Try setting the background color of tab-header-background
. 关于2.)尝试设置
tab-header-background
的背景颜色。 Here an example: 这里是一个例子:
.tab-pane>*.tab-header-area>*.tab-header-background {
-fx-background-color: -fx-outer-border, -fx-text-box-border, white;
}
I copied this snippet from the default Modena theme and modified it. 我从默认的Modena主题复制了此代码片段,并对其进行了修改。 The '>' selector selects direct children and the '*' is called the universal selector and it selects a single element of any type.
“>”选择器选择直接子代,“ *”称为通用选择器 ,它选择任何类型的单个元素。 However, it can be ommitted here, since it is used in combination with a simple selector.
但是,由于它与简单的选择器结合使用,因此可以在此处省略。
Sorry I do not know how to solve your first problem yet. 抱歉,我不知道如何解决您的第一个问题。 Maybe I'll find something.
也许我会找到一些东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.