html - AS3 错误? css标签后自动输入换行符

标签 html css flash actionscript-3 textfield

我正在使用以下 css 和 html 属性渲染 TextField (Flash CS5):

css = "a {font-weight: bold;} fu {color: #00A0A0;}"
wordWrap = true
multiline = true
html = <![CDATA[&quot;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>&quot;]]>

最后一个引言呈现在“我们的目标...”下面的一行中。它的渲染如下:

...

我们的目标是继续创新

"

将引用与“WE AIM...”放在同一行的唯一方法是:

a) 要么把它放在 <fu> 里面

b) 或删除 <fu>总共。

这是 Flash 错误吗?我是否在使用 css 或 html 时做错了什么?

提前非常感谢,

比尔

最佳答案

这里的问题是 htmlText 仅支持 limited number of tags and attributes ,因此 CSS 支持坦率地说相当差。所以这不是一个错误,而是一个已知的限制......

我的建议是使用带有类属性span标签,例如:

css = ".foo {color: #00A0A0;}"

html = "&quot;[...]the past centuries…
<span class=\"foo\">WE AIM TO CARRY ON WITH THE INNOVATION</span>&quot;";

关于html - AS3 错误? css标签后自动输入换行符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6489906/

相关文章:

javascript - 使用 JavaScript 为所有 P 标签分配时间、日期和城市

css - 大图像层在 chrome 中消失

css - 将页脚与侧边栏对齐

javascript - 一定宽度后自动调整图像大小

android - 有什么方法可以在基于 HTML 的移动应用程序中使用 Flash?

Flash 记录器不包括 Firefox 中的 cookie

javascript - 当突出显示的行是表格主体中可见的最后一行时滚动表格

html - 用 :nth-child? 选择一半的元素

android - 如何使用 Jsoup 解析 <div class ="name"> 中的文本?

Flash 有时无法触发 URLLoader 上的任何事件