Flex - 样式TextArea与CSS

时间:2012-02-07 20:23:44

标签: css flex textarea

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

1 个答案:

答案 0 :(得分:2)

<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');
}