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

发布于 2024-11-17 13:19:25 字数 746 浏览 2 评论 0原文

我正在使用以下 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;]]>

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

...

我们的目标是继续创新

在与“我们的目标...”同一行中渲染引用的唯一方法是:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

沉默的熊 2024-11-24 13:19:25

这里的问题是 htmlText 仅支持 标签和属性的数量有限,因此 CSS 支持坦率地说相当差。所以这不是一个错误,而是一个已知的限制...

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

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

html = ""[...]the past centuries…
<span class=\"foo\">WE AIM TO CARRY ON WITH THE INNOVATION</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 = ".foo {color: #00A0A0;}"

html = ""[...]the past centuries…
<span class=\"foo\">WE AIM TO CARRY ON WITH THE INNOVATION</span>"";
Oo萌小芽oO 2024-11-24 13:19:25

无需采用复杂的“跨度”方式,只需在 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;}"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文