【发布时间】:2017-12-28 17:08:32
【问题描述】:
我正在尝试在我的应用程序中弄圆底角,但结果是这样的:
这是 CSS 文件:
.mainFxmlClass {
#pane{
-fx-background-size: 1200 900;
-fx-background-radius: 0 0 18 18;
-fx-border-radius: 0 0 18 18;
-fx-background-color: #FC3D44;
}
}
还有我的主要课程:
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("Preview.fxml"));
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
如何去除这些白角?
【问题讨论】:
-
-fx-border-radius: 10 10 0 0;-fx-background-radius: 10 10 0 0; -
尝试将场景的填充设为透明,scene.setFill(Color.Transparent);