JavaFX样式优先级
从上到下,优先级越来越高,越往下,越会生效
-
a style from a user agent stylesheet in javafx.application.Application.setUserAgentStylesheet(String)
-
value set from code, for example calling javafx.scene.Node.setOpacity(double)
-
a style from an author stylesheet in javafx.scene.Scene.getStylesheets() or javafx.scene.Parent.getStylesheets()
-
a style from javafx.scene.Node.setStyle(String)
1 来自Application的样式
2 代码设置的样式
3 css scene或 parent设置的样式
4 当前Node设置的样式