1

我正在尝试构建自己的加载对话框。我有一个 .*png 代表加载指示器。此图像将设置在包含在边框窗格中的 imageview 中。我的问题是边框背景拒绝变得透明。我尝试了多种选择,但没有像我想要的那样奏效。我尝试直接在 FXML 中设置背景,但也在 Javacode 和 CSS 中设置。没有任何效果。

当我更新到 Java 1.8_77 frin 1.8_66 时出现了这个问题。我用谷歌搜索了它,但没有找到任何关于此的信息。

有谁知道为什么这不起作用?

我尝试过:

CSS

-fx-background-color: transparent;
-fx-background-color: none;
-fx-background-color: transparent !important;
-fx-background-color: rgba

爪哇

borderPane.setBackground(Background.EMPTY);
borderPane.getScene().setFill(Color.TRANSPARENT);
borderPane.getScene().getRoot().setStyle("-fx-background-color: transparent !important;");

FXML 与 CSS 相同

4

0 回答 0