AS3 错误? css标签后自动输入换行符
我正在使用以下 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>"]]>
最后一个引用在“我们的目标...”下面的一行中渲染。它的渲染方式如下:
...
我们的目标是继续创新
”
在与“我们的目标...”同一行中渲染引用的唯一方法是:
a) 要么将其放在 INSIDE < fu>
b) 或者完全删除
这是 Flash 错误吗?
非常感谢,
Bill 。
I am rendering a TextField (Flash CS5) with the following css and html properties :
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>"]]>
The last QUOTE is rendered in a line BELOW "WE AIM TO...". It's rendered like this :
...
WE AIM TO CARRY ON WITH THE INNOVATION
"
The ONLY way to render the quote in the same line with "WE AIM..." is to :
a) Either put it INSIDE <fu>
b) Or remove <fu>
altogether.
Is this a Flash bug? Am I doing something wrong with css or html?
Many thanks in advance,
Bill
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这里的问题是
htmlText
仅支持 标签和属性的数量有限,因此 CSS 支持坦率地说相当差。所以这不是一个错误,而是一个已知的限制...我的建议是使用带有 class 属性 的 span 标签,例如:
The problem here is that
htmlText
supports only a limited number of tags and attributes, and thus CSS support is frankly quite poor. So it is not a bug, but a known limitation...My recommendation would be to use a span tag with a class attribute, like:
无需采用复杂的“跨度”方式,只需在 css 描述中添加以下内容即可:
css = "a {font-weight: bold;} fu {color: #00A0A0; display:inline;}”
Instead of going the complex "span" way, just add this in you css description:
css = "a {font-weight: bold;} fu {color: #00A0A0; display:inline;}"