【发布时间】:2019-04-02 20:03:37
【问题描述】:
我想让图像适合整个按钮而没有多余的空间。我已经尝试过了,但它不起作用:
.toggle-button {
-fx-background-image: url("close.png");
-fx-background-repeat: stretch;
-fx-background-position: center center;
}
.toggle-button:selected{
-fx-background-image: url("contact.png");
}
这是我得到的结果:
如何让退出图片(红色方块)填满整个按钮?
【问题讨论】:
-
试试
background-size:100% 100%
标签: java css image javafx imageview