我对XUL布局有一些奇怪的问题。 我目前的代码:
<xul:vbox>
<xul:hbox> .. some elements .. </xul:hbox>
<xul:hbox>
<xul:hbox> .. some elements .. </xul:hbox>
<xul:hbox flex="1">
<my:button anon-id="btn1" label="Sample button 1"/>
<my:button anon-id="btn2" label="Sample button 2"/>
...
<my:button anon-id="btnN" label="Sample button N"/>
</xul:hbox>
<xul:hbox> .. some elements .. </xul:hbox>
<xul:hbox>
</xul:vbox>
我需要使用可调整大小的按钮来制作hbox,但如果按钮不适合容器 - 它应该包裹2行(或更多行)。目前,当我缩小浏览器大小时 - 一些按钮隐藏在窗口的右边框后面。
my:button
是display: inline-block;
的框,其中包含一些内容。
我在按钮上尝试了float: left
,display: block
,overflow: visibel
以及HTML / CSS中的其他技巧。
感谢您的关注。
答案 0 :(得分:0)
使用<description>
标记代替按钮周围的<hbox>
。