我在按钮中使用SVG作为图像。但是我无法通过CSS为它填充颜色。 以下是渲染按钮的代码。如何使用javaFX中的CSS设计SVG样式FXML
<Button onAction="#closeApplication" >
<graphic>
<SVGPath content="M10,16 10,0 0,8z" styleClass="button‐icon‐shape" />
</graphic>
</Button>
这里是CSS
.button-icon-shape SVGPath{
-fx-fill: red;
}