0

下面的代码生成了两个具有彩色背景和它们之间的边距的组。我已经尝试了明显的 css 修复(margin-top/bottom 等),但它似乎没有任何好处。有谁知道我该怎么做?

    <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>

4

1 回答 1

2

你是说要去掉VGroup的children元素之间的空隙吗?

您可以在组中设置 gap=0,如下所示:

<s:VGroup gap="0" />

希望有帮助。

于 2011-07-09T01:00:38.517 回答