亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

TableView 的樣式如何?

TableView 的樣式如何?

HUWWW 2023-08-23 11:46:45
如圖所示,問題出在表格的右下角。我想將白色方塊的顏色更改為藍色,但我做不到。我嘗試設計樣式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%);
}


查看完整回答
反對 回復 2023-08-23
  • 1 回答
  • 0 關注
  • 234 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號