<s:Image id="loader1" top="50" source="@Embed(source='logo.png')"/>
top属性不起作用,如何对图像进行边距处理?
Since your image is inside a VBox
and you want only to pad the Image and not the other components, here are some options:
Group
: the VBox wil layout the Group vertically and the Image will be positioned 50px from the top of the Group Spacer
between the Image and the component before it and give it a height of 50px. paddingTop="50"
on the VBox. Side note: you'd better use s:VGroup
instead of mx:VBox
since you seem to already use Spark components: it has better performance.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.