我正在使用以下 css 和 html 属性渲染 TextField (Flash CS5):
css = "a {font-weight: bold;} fu {color: #00A0A0;}"
wordWrap = true
multiline = true
html = <![CDATA["Phoenicians were pioneering artisans and ingenious craftsmen…
They developed the technique behind the production of transparent glass…
Their innovation spread around the globe throughout the past centuries…
<fu>WE AIM TO CARRY ON WITH THE INNOVATION</fu>"]]>
最后一个引言呈现在“我们的目标...”下面的一行中。它的渲染如下:
...
我们的目标是继续创新
"
将引用与“WE AIM...”放在同一行的唯一方法是:
a) 要么把它放在 <fu>
里面
b) 或删除 <fu>
总共。
这是 Flash 错误吗?我是否在使用 css 或 html 时做错了什么?
提前非常感谢,
比尔
最佳答案
这里的问题是 htmlText
仅支持 limited number of tags and attributes ,因此 CSS 支持坦率地说相当差。所以这不是一个错误,而是一个已知的限制......
我的建议是使用带有类属性的span标签,例如:
css = ".foo {color: #00A0A0;}"
html = ""[...]the past centuries…
<span class=\"foo\">WE AIM TO CARRY ON WITH THE INNOVATION</span>"";
关于html - AS3 错误? css标签后自动输入换行符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6489906/