只是想知道是否可以将* .css应用于spark TextArea?如果是这样,怎么办?

最佳答案

<fx:Style>
    @namespace s "library://ns.adobe.com/flex/spark";
    @namespace mx "library://ns.adobe.com/flex/mx";
    @namespace local "*";
    s|Label
    {
        color:#33494A;
        fontFamily: "ApexNew";
        fontSize: 14pt;
    }
    s|TextArea
    {
        color:#33494A;
        fontFamily: "ApexNew";
        fontSize: 14pt;
    }
    @font-face
    {
        fontFamily: "ApexNew";
        src:url('font/ApexNew-Medium.otf');
    }
</fx:Style>


要么

<fx:Style source="something.css"/>


[something.css]

@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
@namespace local "*";
s|Label
{
    color:#33494A;
    fontFamily: "ApexNew";
    fontSize: 14pt;
}
s|TextArea
{
    color:#33494A;
    fontFamily: "ApexNew";
    fontSize: 14pt;
}
@font-face
{
    fontFamily: "ApexNew";
    src:url('font/ApexNew-Medium.otf');
}

09-20 20:06