简体   繁体   English

菜单样式CSS Java

[英]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. 已经从Java jar中提取了Modena,以查看其操作方式,但无济于事。 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. 此刻的CSS非常简单,只是不确定要更改/添加哪个元素。

    .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;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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