简体   繁体   中英

Menu Style CSS Java

Am hoping someone can advise what is need to be changed to remove the hideous border (?) from this menu (see image).

Have extracted modena from the java jar to see how they do it but to no avail. Sure it's very very simple just drawing a blank at the moment.

菜单的屏幕截图,菜单上带有白色边框

The css at the moment is very simple just not sure which element need to be changed / added.

    .menu-bar {
      -fx-background-color:#237a72;
      /*-fx-border-width:2;*/
    }

    .menu-bar .label {
       -fx-text-fill:#ffffff;
    }

    .menu-bar .label:hover {
       -fx-text-fill:yellow;
    }

    .menu-item {
       -fx-background-color:#237a72;
       -fx-border-color: #237a72;
    }

Many Thanks.

The white border is the background color of the context-menu. So if you want to get rid of it, you could remove the padding:

.context-menu {
    -fx-padding: 0;
}

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM