我有RichEditableText组件,在这个组件中我根据条件创建了超链接标签,但不需要内联样式(color font-family)。我想应用样式名称(CSS)。是否可以为超链接应用样式名称? 提出一些想法
<s:RichEditableText editable="false" selectable="false" mouseEnabled="{user.isSubscribed}" mouseChildren="{user.isSubscribed}">
<s:content>
<s:a click="linkelement1_clickHandler(event)" >
<s:span styleName="bodyLinkContent10" >{user.isSubscribed ? "Contact Participant" : "Unavailable"}</s:span></s:a>
</s:content>
</s:RichEditableText>
样式名称不适用?你能告诉我这个原因吗?
我试过
<s:RichEditableText editable="false" selectable="false" styleName="{user.isSubscribed ? 'bodyLinkContent10':'bodyContentGrey10'" mouseEnabled="{user.isSubscribed}" mouseChildren="{user.isSubscribed}">
<s:content>
<s:a click="linkelement1_clickHandler(event)" fontSize="10"><s:span textDecoration="none" color="{user.isSubscribed ? 0x003399 : 0x666666}">{user.isSubscribed ? "Contact Participant" : "Unavailable"}</s:span></s:a>
</s:content>
</s:RichEditableText>
它工作正常但是要求仅适用于CSS。任何申请方式?