开发者

Using CSS to set style class

开发者 https://www.devze.com 2022-12-28 06:33 出处:网络
I\'ve got the following CSS which I\'d like to get working. I\'m sure I\'ve done something similar once, but I can\'t find the answer on google.

I've got the following CSS which I'd like to get working. I'm sure I've done something similar once, but I can't find the answer on google.

Basically some style properties have child properties which can be changed, suchas Container.borderSkin. You can set borderThickness, borderS开发者_如何转开发tyle etc, all on the borderSkin style.

<mx:Style>
        .myBorderSkin
        {
            borderThickness: 5;
            borderColor: #FF0000;
            /*borderStyle: none;*/
        }

        MyControl
        {
            borderSkin: .myBorderSkin;
        }
</mx:Style>

Unfortunatly when I run the application, I get the error "TypeError: Error #1034: Type Coercion failed: cannot convert "myBorderSkin" to Class."


This is what I was thinking of:

ButtonBar 
{ 
        buttonStyleName: "buttonBarButton"; 
        firstButtonStyleName: "firstButtonBarButton"; 
        lastButtonStyleName: "lastButtonBarButton";
}

.buttonBarButton 
{
        color: #000000;
        textRollOverColor: #000000;
        textSelectedColor:#000000; 
}

By setting the {x}StyleName property you can point it at a CSS selector.

0

精彩评论

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