gpt4 book ai didi

css - tabStyleName 使用了哪些样式?

转载 作者:太空宇宙 更新时间:2023-11-04 05:30:53 25 4
gpt4 key购买 nike

语言引用说“指定选项卡样式的 CSS 样式声明的名称。默认值未定义。”但是,正在使用的样式的“类型”是什么?也就是说,我可以在该样式定义中放入哪些样式属性。

例如,我想设置选项卡上文本的disabledColor。我似乎做不到。更糟糕的是,我还不知道我能做什么!

最佳答案

根据 livedocs , tabStyleName 样式适用于所使用的 Tab 类 - 这是隐藏的,因此在在线引用中不可用。您可以查找源代码 - 转到 flex 的安装文件夹并找到正确版本的 sdk,然后向下浏览到文件 mx\controls\tabBarClasses\Tab.as - 您应该能够找到该类接受的样式属性。

The Tab type selector defines values on the hidden mx.controls.tabBarClasses.Tab class.
The default values for the Tab type selector are defined in the defaults.css file.

You can also define the styles in a class selector that you specify using the tabStyleName style property; for example:

<mx:Style>
TabNavigator {
tabStyleName:myTabStyle;
}
.myTabStyle {
fillColors: #006699, #cccc66;
upSkin: ClassReference("CustomSkinClass");
overSkin: ClassReference("CustomSkinClass");
downSkin: ClassReference("CustomSkinClass");
}
</mx:Style>

style.css文件中写入css

.myTabStyle
{
disabledColor: #B0B0B0;
}

使用以下方法将 CSS 文件包含到您的 Application 文件中:

<mx:Style source="style.css"/>

现在您可以将其设置为:

<mx:TabNavigator tabStyleName="myTabStyle" other="attributes"/>

如果您不想要单独的 css 文件,您可以使用以下方式内联 css:

<mx:Style>
.myTabStyle
{
disabledColor: #B0B0B0;
}
</mx:Style>

关于css - tabStyleName 使用了哪些样式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3238061/

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