您的位置:首页 > Web前端 > CSS

top,bottom,left,right,horizontalCenter和verticalCenter样式

2013-01-19 17:06 495 查看
verticalCenter=“0” 表示垂直居中,horizontalCenter=0表示水平居中

<?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:Declarations>

<!-- 将非可视元素(例如服务、值对象)放在此处 -->

</fx:Declarations>

<s:BorderContainer horizontalCenter="0" verticalCenter="0" backgroundColor="#000000" backgroundAlpha="0.3" borderStyle="solid" borderColor="#000000" alpha="0.5" width="500" height="300">

<mx:Text text="Top Left" left="10" top="10" />

<mx:Text text="Bottom Left" left="10" bottom="10" />

<mx:Text text="Bottom Center" bottom="10" horizontalCenter="0" />

<mx:Text text="Center" horizontalCenter="0" verticalCenter="0" />

<mx:Text text="Bottom Right" right="10" bottom="10" />

<mx:Text text="Center Right" verticalCenter="0" right="10" />

<mx:Text text="Center Left " left="10" verticalCenter="0" />

<mx:Text text="Top Center" horizontalCenter="0" top="10" />

<mx:Text text="Top Right" right="10" top="10" />

</s:BorderContainer>

</s:Application>

来源:http://zw7534313.iteye.com/blog/848901
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息