CSS를 통해 Javafx에서 내 메뉴 바 및 menuitems의 배경색을 변경하려고합니다. 메뉴 바 색상과 메뉴를 변경하기 위해 이미 관리했지만 menuitems에는 이상한 문제가 있습니다. 배경색을 변경 한 후에는 항상 상단과 하단에 흰색 테두리가 있습니다. 이 내 CSS 코드 :Javafx menuitem white border
.menu-bar {
-fx-background-color: green;
}
.menu-bar .menu-button:hover, .menu-bar .menu-button:focused, .menu-bar .menu-button:showing {
-fx-background: -fx-accent;
-fx-background-color: darkgreen;
-fx-text-fill: -fx-selection-bar-text;
}
.menu-item {
-fx-background-color: darkgreen;
}
그리고 여기 오류의 이미지입니다 : Image (미안 해요, 난이 내 첫 번째 게시물 있기 때문에, 이미지를 게시 할 수 없습니다 나는 내가 너무 적은 명성을 가지고 ! ...)
나는 맨 아래에있는 테두리 (더 큰되고 있음) 나는 코드 줄 추가하면 인식 : 그래서 분명히
.menu-item {
-fx-background-color: darkgreen;
-fx-padding: 0em 0em 0em 0em;
}
는 패딩 함께 할 수있는 뭔가가,하지만 난 돈 정말 모르겠어 ...
대단히 감사합니다. 완벽하게 작동합니다. – mathiasj