如圖所示,問題出在表格的右下角。我想將白色方塊的顏色更改為藍色,但我做不到。我嘗試設計樣式ScrollPane,但似乎不起作用。白色塊的樣式是由 控制的嗎ScrollPane?CSS:/******************************************************************************* * * * ScrollPane * * * ******************************************************************************/.scroll-pane{ -fx-background-color: #30466B;}.scroll-pane > .viewport { -fx-background-color: #30466B;}.scroll-pane > .scroll-bar:horizontal { -fx-background-insets: 0 1 1 1, 1; -fx-padding: 0 1 0 1; -fx-background-color: #30466B;}.scroll-pane > .scroll-bar:horizontal > .increment-button,.scroll-pane > .scroll-bar:horizontal > .decrement-button { -fx-padding: 0.166667em 0.25em 0.25em 0.25em; /* 2 3 3 3 */ -fx-background-color: #30466B;}.scroll-pane > .scroll-bar:vertical > .increment-button,.scroll-pane > .scroll-bar:vertical > .decrement-button { -fx-padding: 0.25em 0.25em 0.25em 0.166667em; /* 3 3 3 2 */ -fx-background-color: #30466B;}.scroll-pane > .scroll-bar:vertical { -fx-background-insets: 1 1 1 0, 1; -fx-padding: 1 0 1 0; -fx-background-color: #30466B;}.scroll-pane > .corner { -fx-background-color: #30466B; -fx-background-insets: 0 1 1 0;}/* new styleclass for edge to edge scrollpanes that don't want to draw a border */.scroll-pane.edge-to-edge,.tab-pane > * > .scroll-pane { -fx-background-color: #30466B; -fx-background-insets: 0; -fx-padding: 0;}.scroll-pane.edge-to-edge > .scroll-bar,.tab-pane > * > .scroll-pane > .scroll-bar,.titled-pane > .content > .scroll-pane > .scroll-bar { -fx-background-insets: 0; -fx-padding: 0; -fx-background-color: #30466B;}
1 回答

慕尼黑的夜晚無繁華
TA貢獻1864條經驗 獲得超6個贊
角框是用 styleClass“corner”定義的。您需要覆蓋 tableView 的以下 css 實現:
.table-view > .virtual-flow > .corner { -fx-background-color: derive(-fx-base,-1%); }
添加回答
舉報
0/150
提交
取消