我试图从工具提示中删除页面 Angular ,但我无法让 CSS 粘住。
我的代码看起来像:
public class PinRender extends StackPane {
private Shape shape;
private Text textNode;
private String text;
public PinRender(Shape shape) {
this.shape = shape;
this.textNode = new Text();
this.text = "";
this.getChildren().add(shape);
this.getChildren().add(textNode);
this.getStylesheets().add(PinRender.class.getResource("ToolTipStyle.css").toExternalForm());
Tooltip tooltip = new Tooltip("ToolTips are the best!");
tooltip.getStyleClass().add("ttip");
Tooltip.install(this, tooltip);
}
public void setColor(Color c) {
shape.setFill(c);
}
}
我的 CSS 看起来像:
.ttip{
-fx-background-radius: 0 0 0 0;
-fx-background-color: linear-gradient(white,whitesmoke);
}
.page-corner {
-fx-shape: " ";
}
但我仍然得到默认的丑陋的黄色和折叠的页 Angular 。
我是否尝试错误地使用 CSS?
最佳答案
.page-corner {
-fx-background-color: transparent;
}
关于JavaFX 工具提示删除页面 Angular ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19775989/