我有以下 CSS,我想开始工作。我确定我做过一次类似的事情,但我无法在谷歌上找到答案。
基本上一些样式属性有可以改变的子属性,例如Container.borderSkin。您可以在 borderSkin 样式上设置 borderThickness、borderStyle 等。
<mx:Style>
.myBorderSkin
{
borderThickness: 5;
borderColor: #FF0000;
/*borderStyle: none;*/
}
MyControl
{
borderSkin: .myBorderSkin;
}
</mx:Style>
不幸的是,当我运行该应用程序时,出现错误“TypeError:错误 #1034:类型强制失败:无法将“myBorderSkin”转换为类。”
最佳答案
这就是我的想法:
ButtonBar
{
buttonStyleName: "buttonBarButton";
firstButtonStyleName: "firstButtonBarButton";
lastButtonStyleName: "lastButtonBarButton";
}
.buttonBarButton
{
color: #000000;
textRollOverColor: #000000;
textSelectedColor:#000000;
}
通过设置 {x}StyleName 属性,您可以将其指向 CSS 选择器。
关于css - 使用 CSS 设置样式类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2730941/