2017-07-18 52 views

回答

2

按照documentation,你應該能夠在外部CSS文件中使用

.button:default { 
    /* your style rules here */ 
} 

默認的樣式表,modena.css,有規則

.button:default { 
    -fx-base: -fx-default-button ; 
} 

其中-fx-default-button被定義爲淡藍色:

-fx-default-button: #ABD8ED; 

所以另一種選擇將只是改變-fx-default-button定義:

.root { 
    -fx-default-button: /* your preferred color here */ ; 
}