Creating a vertically stacked group of items in HTML like a VGroup

In Flex there is a container component called VGroup that lays out it's contents vertically. What would the equivalent to the following be in HTML:

<VGroup gap="10">
   <button height="50" width="20"/>
   <button height="10"/>
   <button height="100"/>
</VGroup>

The features of the VGroup, for HTML developers, are that each item in the VGroup tag is it's own row. In the code above there would be three rows because there are 3 items. The gap property specifies how much space is between each item. The row heights are dynamic and fit the height of the element. There is a horizontalAlign property that aligns the elements left, center or right.

I think a table tag with table rows is the closest tag that mimics the VGroup behavior. I'm looking for a div or span equivalent if that is better.

I've posted another related question on creating an HGroup if the answers are related.


Huh? Three s inside a and then set height/gap properties with CSS? Same with HGroup, just float all the divs to left.


This appears to be doing what I want it to:

<div>
    <input type="button" style="display:block;" value="Button 1"/>
    <input type="button" style="display:block;" value="Button 2"/>
</div>

Setting display to block causes it to wrap to the next line.

链接地址: http://www.djcxy.com/p/34666.html

上一篇: 带有itemrenderer的简单数据组无法在Flex移动设备上工作

下一篇: 在HTML中创建垂直堆叠的项目组,如VGroup