【发布时间】:2017-12-02 14:57:16
【问题描述】:
我正在尝试更改 JavaFX 组合框列表的文本颜色,但它似乎不起作用。
.combo-box .list-cell {
-fx-text-fill: -fx-my-menu-font-color-highlighted;
}
.combo-box-popup .list-view{
-fx-background-color: -fx-my-menu-color;
}
.combo-box-popup .list-view .list-cell{
-fx-text-fill: #ff0000;
-fx-padding: 4 0 4 5;
-fx-background-color: -fx-my-menu-color;
}
.combo-box-popup .list-view .list-cell:filled:selected, .combo-box-popup .list-view .list-cell:filled:selected:hover{
-fx-background-color: -fx-my-menu-color-highlighted;
-fx-text-fill: -fx-my-menu-font-color-highlighted;
}
.combo-box-popup .list-view .list-cell:filled:hover{
-fx-background-color: -fx-my-menu-color-highlighted;
-fx-text-fill: -fx-my-menu-font-color-highlighted;
}
.combo-box-base{
-fx-background-color: -fx-my-menu-color;
-fx-padding: 0;
}
这将返回以下内容: 下拉列表文本不是白色的
我该如何解决这个问题?我的 CSS 知识不是很强。
【问题讨论】: