html
  • flex
  • fonts
  • htmltext
  • 2010-04-11 58 views 0 likes 
    0

    我想在flex textArea中创建文本突出显示,但是它的htmlText不支持<font bgcolor='#FFFF00'> part of my text </font>,所以我正在寻找一种字体巫婆,与Courier新的相反,当我将其嵌入到闪存中时,并使用我获得的颜色进行书写突出效果为我的那段文字,如我所输入<font family="negativeOfCourier" color='#FFFF00'> part of my text </font>Courier新字体是否有负面影响?

    +0

    相反,我的意思是,背景应该是文字结束文本应该是背景 – Biroka 2010-04-11 17:46:26

    回答

    1

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

    注:我试图将它张贴格式化的,但这样做不会出现接受字体标签。

    编辑:你可以去http://www.w3schools.com找到这个东西。

    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>'; 
    
    相关问题