---
title: "[Flash/Flex] 使用css定义文本样式"
author: "AS3"
date: "2011-07-28T00:05:59Z"
tags: []
categories: ["Web前端"]
slug: "flash-flex-css"
draft: false
lastmod: "2011-07-28T00:05:59Z"
id: 1134453
url: "https://as3.iteye.com/blog/1134453"
---

[http://bbs.9ria.com/viewthread.php?tid=88609&extra=page%3D1%26amp%3Borderby%3Ddateline%26amp%3Bfilter%3D2592000](http://bbs.9ria.com/viewthread.php?tid=88609&extra=page%3D1%26amp%3Borderby%3Ddateline%26amp%3Bfilter%3D2592000)

 

 

# \[新闻资讯] [\[Flash/Flex\]](http://bbs.9ria.com/forumdisplay.php?fid=43&filter=type&typeid=159) 使用css定义文本样式

资讯类型: 翻译

来源页面: [http://www.adobe.com/devnet/actionscript/samples/media\_7.html](http://www.adobe.com/devnet/actionscript/samples/media_7.html)

资讯原标题: Classic text formatting using CSS

资讯原作者: Adobe

翻译词数: 245 词

我的评论:打基础哦~   
对这篇文你有啥看法，跟贴说说吧！欢迎口水和板砖，哈哈。欢迎大家和我们一同分享更多资讯。

使用css定义文本样式  
        CSS以及html格式文本可以去格式化平常用的文本框。例如：你可以通过html标签(&lt;body&gt;, &lt;p&gt;, &lt;div&gt;, &lt;span&gt;, &lt;a&gt;等等）去创建一个格式化的文本，然后对文本的htmlText属性赋值就可以。下面这个例子是已经格式化好了的，你可以通过外部的css文件调整文本的样式。  
        &lt;[点我去看效果吧](http://www.adobe.com/devnet/actionscript/samples/media_7.html)&gt;  
        这个例子说明如何使用外部的css文件去修改已经被htmlText定义好的文本。仔细看看这个helloworld.css还有AS代码，看他们值怎么融合在一起的。  
        提示：确定在css中定义的字体fla里都有。否则就看不到效果了。例如：如果你想用 Arial regular, bold, and italic 里的任意集中组合起来用，你就需要绑定Arial regular, Arial bold, Arial italic, and Arial bold italic 在你的fla文件里.......  
        附上源文件。