javafx 表格样式基本(表头颜色)

前两个去除表格横竖线

.table-view .table-row-cell {

    -fx-background-insets: 0;

}
.table-view .table-row-cell .table-cell {

    -fx-border-width: 0px;

}
/**
*表格边框颜色
*/
.table-view *.column-header-background { /* FX theme stylesheet */

-fx-background-color: #5f93e7;

-fx-background-insets: 0px, 0px;

}
/**
 * 表头背景颜色变化
 */
.table-column .label{
    -fx-background-color: #5f93e7;
    -fx-text-fill: white ;
    -fx-text-alignment: center ;
    -fx-graphic-text-gap:0;

}
/**
 * 调节padding
 */
.table-column{
    -fx-padding:0;
}
.table-view:row-selection .column-header-background .filler{
    visibility: false;
    -fx-background-color: #5f93e7;
}

你可能感兴趣的:(javafx)