gpt4 book ai didi

css - 从自定义组件中获取 CSS 样式值

转载 作者:行者123 更新时间:2023-11-28 13:11:45 27 4
gpt4 key购买 nike

我有一个风格:

.rating{
fontSize:24;
}

和一个类型为 s|Graphic 的自定义 MXML 组件。如何从 actionscript 中的组件获取 fontSize 值?

我试过:

public var fff:String = getStyle("fontSize"); //undefined (runtime error)
public var fff2:String = this.getStyle("fontSize"); // undefined (compile time error)

最佳答案

查看此页面了解更多信息。

http://livedocs.adobe.com/flex/3/html/help.html?content=styles_08.html

somevar = this.getStyle("fontSize");加入初始化函数

关于css - 从自定义组件中获取 CSS 样式值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15450014/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com