Flex 宋体、黑体、楷体、仿宋字体样式
2012-04-11 15:54
218 查看
s|Label { font-family: FangSong_GB2312; /*SimSun,SimHei,KaiTi_GB2312,FangSong_GB2312,*/ /*以上四种字体默认使用的是本地设备字体,无法开启抗锯齿功能,字体边缘有毛边*/ backgroundColor: #000000; color: #FF0000; fontSize: 128px; line-height:128px; letter-spacing:0px; /*fontStyle: italic;*/ /*fontWeight: bold;*/ /*textDecoration: underline;*/ }
测试页面
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <!--<fx:Style source="ydp.css"/>--> <fx:Script> <![CDATA[ protected function button1_clickHandler(event:MouseEvent):void { // TODO Auto-generated method stub this.lbText.setStyle("fontFamily", "SimSun"); } protected function button2_clickHandler(event:MouseEvent):void { // TODO Auto-generated method stub this.lbText.setStyle("fontFamily", "SimHei"); } protected function button3_clickHandler(event:MouseEvent):void { // TODO Auto-generated method stub this.lbText.setStyle("fontFamily", "FangSong_GB2312"); } protected function button4_clickHandler(event:MouseEvent):void { // TODO Auto-generated method stub this.lbText.setStyle("fontFamily", "KaiTi_GB2312"); } ]]> </fx:Script> <fx:Declarations> <!-- 将非可视元素(例如服务、值对象)放在此处 --> </fx:Declarations> <s:Label id="lbText" x="96" y="67" text="低碳交通 绿色通行" width="512" height="256" backgroundColor="#000000" color="#FF0000" fontSize="128" lineHeight="128" /> <s:Button x="4" y="3" label="宋体" click="button1_clickHandler(event)" /> <s:Button x="82" y="3" label="黑体" click="button2_clickHandler(event)"/> <s:Button x="167" y="3" label="仿宋" click="button3_clickHandler(event)"/> <s:Button x="245" y="3" label="楷体" click="button4_clickHandler(event)"/> </s:Application>
相关文章推荐
- Flex 宋体、黑体、楷体、仿宋字体样式
- CSS设置字体种类,如宋体,楷体,黑体,仿宋等等。。。。
- css设置各种中文字体如雅黑、黑体、宋体、楷体等等
- css设置各种中文字体如雅黑、黑体、宋体、楷体的方法
- css设置各种中文字体如雅黑、黑体、宋体、楷体等等
- css设置各种中文字体如雅黑、黑体、宋体、楷体等等
- css设置各种中文字体如雅黑、黑体、宋体、楷体等等(未)
- css设置各种中文字体,雅黑,黑体,宋体,楷体等等
- css设置各种中文字体如雅黑、黑体、宋体、楷体等等
- css设置各种中文字体如雅黑、黑体、宋体、楷体等等
- css设置各种中文字体如雅黑、黑体、宋体、楷体等等
- css设置各种中文字体如雅黑、黑体、宋体、楷体等等
- Flex中如何通过设定headerStyleName样式在Accordion控件中使用嵌入字体的例子
- psychopy设置中文显示字体 楷体、宋体、微软雅黑
- 修改flex chart中Legend的字体样式
- 修改flex chart中Legend的字体样式
- Flex更改Alert提示框的字体大小和样式
- 修改flex chart中Legend的字体样式
- Flex编程注意之修改CategoryAxis的字体样式(大小、颜色、粗斜体等)
- Flex学习总结:Flex更改Alert提示框的字体大小和样式等