Reputation: 890
I want to add an image (png) this way:
#leftCorner {
-fx-background-image: url("images/backgroundTrain2.png");
-fx-background-repeat: stretch;
-fx-background-size: 150.0 71.0;
-fx-background-position: center center;
}
the problem is that I loose the transparency of the white part of the image. Can somebody tell me what I can do that it stays transparent?
thats the picture i try to add as background
Upvotes: 4
Views: 26165
Reputation: 1900
I use -fx-background-color:transparent
to set pngs on my Buttons and transparency works. Try this.
Upvotes: 11