fle中alert样式的设置

来源:互联网 发布:python网络编程书籍 编辑:程序博客网 时间:2024/05/16 10:23

 Alert的文字样式不能通过属性来修改,通常是通过<styel/>来设置的。

对于中文用户来说,通常最简单最基础的一个需求就是把所有的字体都设置为12号

<mx:Style>
Alert{ font-size: 12}
</mx:Style>
注意是 font-size,而不是fontSize

也可以对标题,信息,按钮对应的文字分别设置
<mx:Style>
Alert {
titleStyleName: “alertTitle”;
messageStyleName: “alertMessage”;
buttonStyleName: “alertButton”;
}

.alertTitle {
letterSpacing: 0;
//各字符之间显示的附加像素数

fontSize: 18;
//字体大小

fontWeight: normal;
//bold 加粗, normal 正常

color: red;
//任何有效的颜色标识符,或者是常量 red,green,blue

textAlign: left;
//文本对齐方式center,justify,left,right

//还有其他样式
}

.alertMessage {
//样式设置方法同上
}

.alertButton {
//样式设置方法同上
}
</mx:Style>

 

 

原创粉丝点击