<?xml version="1.0"?>
<!-- styles/TimeFormat.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="red">
<mx:Style>
Button
{
marginLeft: 500px;
}
</mx:Style>
<mx:Button label="Start" />
</mx:Application>marginLeft不工作,我怎样才能将按钮从默认的中心移到其他地方?
发布于 2013-04-29 18:30:56
我试着用风格来做到这一点,并取得了成效:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
minWidth="955" minHeight="600">
<mx:Style>
Button
{
left: 500px;
top: 20px;
}
</mx:Style>
<mx:Button label="Hello"/>
</mx:Application>发布于 2013-04-30 18:02:39
Alternate you can add <mx:Spacer width="500"/>发布于 2013-04-29 17:36:49
如果要移动按钮,请使用left或x属性:
<mx:Button label="Start" left="500" />https://stackoverflow.com/questions/16275315
复制相似问题