![](http://dl.iteye.com/upload/attachment/532849/bac45861-c56e-311d-811d-f8a72654e4ca.jpg)
想去掉这个overlay,于是google。
有一说使用非模态窗,靠这肯定不行,还得一定是模态的。
想想还得从css入手,继续google,功夫不负有心人,终于找到一篇 如何取消FLEX里模态窗口的毛玻璃效果,其中是这样写的:
引用
问:
LYU-9 :
在Flex里面,比如使用
PopUpManager.createPopUp(this,TipWindow,false)
第三个参数设成true 会出现毛玻璃效果让CPU飙升,可不可以改变模态窗口的效果,不让毛玻璃出现?
答:
桃花奶奶 :
改下css样式就ok了。比如说我们用的是titlewindow,我们就改titlewindow中的:
modal-transparency-blur:0;
modalTransparency:0;
问:LYU-9
那个Alert.show()是不是也可以改样式呢?
答:妖子 (6级)
一样的。这个是默认的Alert样式,你在代码里改就可以了。
Alert
{
backgroundAlpha: 0.90; /* controls the alpha of the panel content area. */
backgroundColor: #869CA7;
borderAlpha: 0.90; /* controls the alpha of the panel top, bottom and sides. */
borderColor: #869CA7;
.......
}
这篇文章的结果就是使用Alert全局样式,然后设置modal-transparency-blur为0,modalTransparency为0。
LYU-9 :
在Flex里面,比如使用
PopUpManager.createPopUp(this,TipWindow,false)
第三个参数设成true 会出现毛玻璃效果让CPU飙升,可不可以改变模态窗口的效果,不让毛玻璃出现?
答:
桃花奶奶 :
改下css样式就ok了。比如说我们用的是titlewindow,我们就改titlewindow中的:
modal-transparency-blur:0;
modalTransparency:0;
问:LYU-9
那个Alert.show()是不是也可以改样式呢?
答:妖子 (6级)
一样的。这个是默认的Alert样式,你在代码里改就可以了。
Alert
{
backgroundAlpha: 0.90; /* controls the alpha of the panel content area. */
backgroundColor: #869CA7;
borderAlpha: 0.90; /* controls the alpha of the panel top, bottom and sides. */
borderColor: #869CA7;
.......
}
- Alert{
- modalTransparency:0;
- modal-transparency-blur:0;
- }
![](http://dl.iteye.com/upload/attachment/532845/270b33bb-e982-3222-bcf6-94b63419ec26.jpg)
最后还是不效果,靠超级的郁闷中。。。
转折点
今天,无意中看到一篇 将应用程序从Flex 3迁移至Flex 4(转载),随便拉拉看看,注意到文中提到一段Css代码:
- s|Button, s|ToggleButton
- {
- skin-class: ClassReference("controls.skins.IconButtonSkin");
- }
马上回到自己的样式写上
- mx|Alert{
- modalTransparency:0;
- modal-transparency-blur:0;
- }
![](http://dl.iteye.com/upload/attachment/532843/63ee57f5-9880-3d04-859c-8b4f352c9eb2.jpg)
呵呵这个世界清静了!
最后,有个问题就是,在这个flex版本乱飞的年代,难道各位老大在写flex的css样式只是
- Alert{
- modalTransparency:0;
- modal-transparency-blur:0;
- }
坑爹呀!
提醒初学者,使用组建方式写css时,记得带上命名空间。
如:ToolTip要写成mx|ToolTip(halo主题)或者是s|ToolTip(spark主题)