我正試圖完成兩個目標。FXML圖像透明度
- 讓圖像對文本透明。
沒有圖像擠壓文本的權利。
<Button fx:id="btn" layoutX="90.0" layoutY="14.0" mnemonicParsing="false" prefHeight="97.0" prefWidth="320.0" styleClass="root" text="Button"> <graphic> <ImageView fitHeight="87.0" fitWidth="244.0"> <image> <Image url="@image.jpg"/> </image> </ImageView> </graphic> </Button>
任何幫助是極大的讚賞。
http://stackoverflow.com/questions/16340269/styling-a-javafx-2-button-using-fxml-only-how - 添加一個圖像到一個按鈕 – FamousFrik
http://stackoverflow.com/questions/34852751/button-with-image-styling-with-fxml-css – FamousFrik