开发者

Set Flex MX Button background color using CSS

开发者 https://www.devze.com 2023-02-22 22:44 出处:网络
Using CSS, how do I set the background color of a Flex MX Button? My button is declared as: <mx:Button label=\"My Button\"/>

Using CSS, how do I set the background color of a Flex MX Button? My button is declared as:

<mx:Button label="My Button"/>

And the CSS is:

@namespace mx "library://ns.adobe.com/flex/mx";

mx|Button {
    color: #66ffff;
    backgroundColor: #333333;
}

backgroundColor doesn't seem to be the correct CSS property for MX Button's background color. Looking at the Flex API docs, I tried fillColors but开发者_StackOverflow中文版 that didn't do anything.

Is it possible to change mx.controls.Button's background color using CSS?


try

Button {
   fillAlphas: 1, 1, 1, 1;
   fillColors: #66ffff, #66ffff, #66ffff, #66ffff;
}

Even if i'd try to use an external .css file

You can create it with Flex Style Explorer and import it by the following statement:

<mx:Style source="yourstylesheet.css" />
0

精彩评论

暂无评论...
验证码 换一张
取 消