I am creating new application in Javafx and I have created Menu bar from javafx fxml and for that css is used to style it. But problem is that parent menu background changes to blue when I hover to sub menu item.
To do that, not only the context-menu
class needs a custom rule, but also the menu-item
and menu
classes, eg:
.menu, .menu-item, .context-menu {
-fx-background-color: crimson;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.