开发者

Changing css properties for selector at runtime

I have a css that defines de skin-class for a custom component, like this :

view|PlaceHolderView {
    skin-class:ClassReference('view.skin.PlaceHolderSkin');
}

Is there a way to change that value at run开发者_Python百科time, so that all instances of the component switch skin?


I found the answer to my question after a bit more digging around.

var dec:CSSStyleDeclaration = styleManager.getStyleDeclaration('view.PlaceHolderView')
dec.setStyle('skinClass', MyOtherSkinClass);
styleManager.setStyleDeclaration('view.PlaceHolderView', dec, true);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜