0
我需要藉助CSS類的幫助,在Java FX中使用日期選取器模塊的樣式。日期選擇器彈出窗口
這是具體的彈出窗口,我也用景觀查看CSS代碼。但在彈出窗口中不起作用。我需要幫助如何在日曆視圖中設置彈出窗口樣式。
(使用intelijIdea)
這是我的代碼和附加的圖片。在彈出的DatePicker的
.date-picker .combo-box {
-fx-background-insets:0px ;
-fx-border-width: 0px;
}
.date-picker .text-field{
-fx-background-radius:0px ;
-fx-border-color: transparent;
}
.date-picker .arrow-button{
-fx-background-radius:0px ;
-fx-background-color: #232323;
}
.date-picker .arrow-button .arrow{
-fx-background-radius:0px ;
-fx-background-color: #1783CC;
}
.date-picker .arrow-button:hover .arrow{
-fx-background-radius:0px ;
-fx-background-color: #40a9ef;
}
.date-picker .button {
-fx-background-color: transparent;
-fx-border-color:transparent;
-fx-pref-height: 35px;
-fx-pref-width: 35px;
}
.date-picker .button:hover {
-fx-border-color:transparent;
-fx-pref-height: 35px;
-fx-pref-width: 35px;
}
.date-picker .button .arrow:pressed {
-fx-border-color:transparent;
-fx-pref-height: 35px;
-fx-pref-width: 35px;
}
.date-picker .cell {
-fx-background-color: #232323;
-fx-pref-width:20px ;
-fx-pref-height:25px ;
}
.date-picker .cell:hover {
-fx-background-color: #1783CC;
-fx-pref-width:20px ;
-fx-pref-height:25px ;
}
.date-picker .cell:focused {
-fx-background-color:#11659e;
-fx-pref-width:20px ;
-fx-pref-height:25px ;
}
.date-picker-popup {
-fx-border-color: #1783CC;
-fx-background-color: black;
}
你說你想要設置彈出式日曆的樣式,但是你沒有說明你想要達到什麼樣的效果。你可以更具體的要求? – ItachiUchiha
@IchichiUchiha我想在日期選擇器的彈出窗口中設置所有組件的樣式。我正在尋找styleClass按鈕欄彈出日期選擇器,類的月單元格,年單元格,日單元格,周單元格,背景..和僞類。 –