Javafx/CSS 中的左上角和右上角圆角
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16564818/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 22:53:37 来源:igfitidea点击:
Top-left and -right corner rounded in Javafx/CSS
提问by user2361460
I would like to create a Pane with 2 rounded corners top-left and top-right, how can i do this in javafx? I know that u can use "border-top-left-radius" in normal css but it wont work under javafx. Until now I tried:
我想创建一个左上角和右上角有 2 个圆角的窗格,我该如何在 javafx 中做到这一点?我知道你可以在普通的 css 中使用“border-top-left-radius”,但它在 javafx 下不起作用。直到现在我试过:
.calendar {
-fx-border-top-left-radius: 10px;
-fx-border-top-right-radius: 10px;
}
Thanks in advance,
提前致谢,
Zombie
僵尸
回答by tonimaroni
.calendar{
-fx-border-radius: 10 10 0 0;
-fx-background-radius: 10 10 0 0;
/* top-left, top-right, bottom-right, and bottom-left corners, in that order. */
}