如何在JavaFX的TextFlow中设置文本和超链接的样式?



我尝试过各种不同的选择器,但无论我使用什么,我的风格似乎被忽略了。知道我哪里做错了吗?

我的css是:

.hint {
    -fx-fill: red;
    -fx-text-fill: red;
    -fx-font-size: 10.0;
}

我的FXML是:

<TextFlow fx:id="flowPortForwarding" GridPane.columnSpan="2147483647" GridPane.rowIndex="5">
                            <children>
                                <Text styleClass="hint" text="Port will be shown in tooltip after connecting to a" />
                                <Hyperlink onAction="#helpPortForwarding" styleClass="hyperlink" text="portforwarding" />
                                <Text styleClass="hint" text="gateway." />
                            </children>
                        </TextFlow>

我的完整资源列表在这里:https://dl.dropboxusercontent.com/u/45205679/Settings.fxmlhttps://dl.dropboxusercontent.com/u/45205679/settings-style.css

看起来我已经有一个选择器"。超链接。hint",所以我引入了一个新的选择器"

最新更新