Flex 4.5 - s:组默认边距?
下面的代码生成两个带有彩色背景的组,并且它们之间有边距。我尝试过明显的 css 修复(顶部/底部边距等),但似乎没有任何好处。有谁知道我该怎么做?
<代码>
<s:VGroup width="100%" height="100%" verticalAlign="middle" horizontalAlign="center">
<s:Group id="topBar" width="100%" height="10%" bottom="0">
<s:Rect width="100%" height="100%">
<s:fill><s:SolidColor color="black" /></s:fill>
</s:Rect>
</s:Group>
<s:Group id="contentBar" width="100%" height="90%" top="0">
<s:Rect width="100%" height="100%">
<s:fill><s:SolidColor color="red" /></s:fill>
</s:Rect>
</s:Group>
</s:VGroup>
<代码>
The code below produces two groups with colored backgrounds and a margin between them. Ive tried the obvious css fixes (margin-top/bottom etc) but it seems it doesnt do any good. Does anyone know how i can do this?
<s:VGroup width="100%" height="100%" verticalAlign="middle" horizontalAlign="center">
<s:Group id="topBar" width="100%" height="10%" bottom="0">
<s:Rect width="100%" height="100%">
<s:fill><s:SolidColor color="black" /></s:fill>
</s:Rect>
</s:Group>
<s:Group id="contentBar" width="100%" height="90%" top="0">
<s:Rect width="100%" height="100%">
<s:fill><s:SolidColor color="red" /></s:fill>
</s:Rect>
</s:Group>
</s:VGroup>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是说要消除 VGroup 子元素之间的间隙吗?
您可以在组中设置gap=0,如下所示:
希望有帮助。
Are you saying you want to get rid of the gap between children elements of the VGroup?
You can set gap=0 in the group, as in:
Hope that helps.