Courier新字体有否定?

时间:2010-04-11 17:42:37

标签: html flex fonts htmltext

我想在flex textArea中创建一个文本高亮显示但它的htmlText不支持<font bgcolor='#FFFF00'> part of my text </font>所以我正在寻找一个字体女巫与Courier new相反,当我将它嵌入flash时,写使用那种颜色,当我输入<font family="negativeOfCourier" color='#FFFF00'> part of my text </font>

时,我会对文本的那一部分产生高亮效果

2 个答案:

答案 0 :(得分:1)

<font style="font-family:courier;color:white;background-color:black;">white text goes here</font>

注意:我尝试将其格式化,但是SO似乎不接受字体标记。

编辑:您可以转到http://www.w3schools.com找到这些内容。

答案 1 :(得分:1)

你应该使用StyleSheet。 示例:

var theCSS:String = ".normaltext{color:#FFFF00;font-family:Courier}.highlightedtext{color:#FFFF00;font-family:Arial}";
var theStyle:StyleSheet = new StyleSheet();
theStyle.parseCSS(theCSS);
theTextArea.styleSheet = theStyle;
theTextArea.htmlText = '<span class="normaltext">Normal text here, and</span><span class="highlightedtext"> the highlighted text here</span>';