1

我对 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: blockoverflow: visibel其他在 HTML/CSS 中工作的技巧。

感谢关注。

4

1 回答 1

0

使用<description>标签而不是<hbox>围绕按钮。

于 2010-10-11T20:26:41.443 回答