【问题标题】:Dijit BorderContainer bottom region heightDijit BorderContainer 底部区域高度
【发布时间】:2011-09-12 17:42:52
【问题描述】:

我有一个简单的 BorderContainer 设置,带有一个中心和底部区域。

<div dojoType="dijit.layout.BorderContainer">
   <div dojoType="dijit.layout.ContentPane" region="center">
       <!-- Some big content -->
   </div>
   <div dojoType="dijit.layout.ContentPane" doLayout="false" region="bottom" id="log">
          <span class="log_msg">First message</span><br/>
          <span class="log_msg">Second message</span><br/>
          <span class="log_msg">Third message</span><br/>
   </div>
</div>

如您所见,底部窗格旨在成为类似于 Eclipse IDE 的日志。我希望日志 div 占据底部窗格的 100%(边距很好),稍后我将添加拆分器。但是,目前它的高度适合其内容,如果内容太多,文本就会简单地隐藏在屏幕之外。 ('overflow' css 规则不适用,因为日志 div 本身大到足以容纳文本,它只是在屏幕外。)

我可以应用哪些样式规则来达到预期的效果?谢谢!

【问题讨论】:

    标签: height dojo border-container


    【解决方案1】:

    specification for BorderContainer 是您必须在顶部和底部区域设置高度(以及在左侧和右侧区域设置宽度)这些尺寸是固定的,并且中心扩展以占据剩余空间。因此,您至少需要给出一个以高度为起点的样式规则。您的拆分器可以让用户调整大小。

    【讨论】:

      猜你喜欢
      • 2010-12-16
      • 2018-03-31
      • 2023-03-23
      • 2012-05-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多