我对 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 中工作的技巧。
感谢关注。