开发者

Flex 3.5 style individual buttons

开发者 https://www.devze.com 2023-03-14 14:02 出处:网络
If I have a button named: <mx:Button id=\"backButton\"> and another named: <开发者_运维问答;mx:Button id=\"cancelButton\"

If I have a button named:

<mx:Button id="backButton">

and another named:

<开发者_运维问答;mx:Button id="cancelButton"

How can I style each button seperatly?

Can I give each button a style, then set the style in CSS... E.g.

Button #style {
  backgroundColor: red;
}


In CSS:

.firstButton {
  backgroundColor: red;
}

.secondButton {
  backgroundColor: blue;
}

Buttons:

<mx:Button id="backButton" styleName="firstButton" />

<mx:Button id="cancelButton" styleName="secondButton" />
0

精彩评论

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