简体   繁体   English

如何在Flex中的单个标签组件中更改字体颜色和大小

[英]how to change font color and size within single label component in flex

i'm trying to create a unordered list in Flex. 我正在尝试在Flex中创建无序列表。 My issue is that within each line, i want the word NEW to be a different font color and different font size from the rest of the label text. 我的问题是,在每一行中,我希望单词NEW与其他标签文本具有不同的字体颜色和不同的字体大小。 I am unsure of how to do this INLINE within the label component. 我不确定如何在标签组件中进行此内联。 Any thoughts anyone? 有任何想法吗?

<s:VGroup fontSize="15" color="#ffffff">
    <s:Label text="\u2022 NEW Invite your friends!" />
    <s:Label text="\u2022 NEW Features coming soon!" />
    <s:Label text="\u2022 NEW Invite your friends!" />
</s:VGroup>

In Flex3 you would just make a HBox with to Label containers that have different styles. 在Flex3中,您只需将HBox与具有不同样式的To Label容器一起使用即可。 Probably the same could be done in Flex 4 by making a Horizontal group within the vertical one you have. 在Flex 4中,可以通过在您拥有的垂直组中创建一个“水平”组来实现相同的效果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM