adobe flash builder 4:组件 Spark.components.Label 不支持 css 类型选择器
我创建了一个新的 MXML 组件,其中包含一些标签和以下样式:
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
@namespace local "*";
s|Label {
font-size:12;
font-weight:bold;
color:white;
}
#timeLeftHGroup {
left:30;
top:12;
}
我在 s|Label
行收到以下警告:
CSS type selectors are not supported in components: 'spark.components.Label'
嗯.. CSS 代码确实有效!它确实改变了颜色,使文本加粗并将字体大小更改为 12,那么为什么我会收到此警告?
Possible Duplicate:
Warning: css type selectors are not supported in components ‘sparks.component.TextInput’
I created a new MXML component that contains some labels and the following style:
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
@namespace local "*";
s|Label {
font-size:12;
font-weight:bold;
color:white;
}
#timeLeftHGroup {
left:30;
top:12;
}
I get the following warning at the s|Label
line:
CSS type selectors are not supported in components: 'spark.components.Label'
Well.. the CSS code does work! it did change the color, make the text bold and changed the font size to 12, so why do i get this warning ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
s|被忽略,因为在组件内部使用时不支持它。尝试将其放入应用于整个应用程序的根级样式表中。
s| is ignored as it's not supported when used inside of a component. Try putting it in a root level style sheet which is applied to the entire application.