Top-left and -right corner rounded in Javafx/CSS

我是研究僧i 提交于 2019-12-18 12:12:39

问题


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:

.calendar {
    -fx-border-top-left-radius: 10px; 
    -fx-border-top-right-radius: 10px; 
}

Thanks in advance,

Zombie


回答1:


.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. */
}


来源:https://stackoverflow.com/questions/16564818/top-left-and-right-corner-rounded-in-javafx-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!