Dijit BorderContainer 底部区域高度
我有一个简单的 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%(边距很好),稍后我将向其添加拆分器。然而,目前它的高度适合其内容,如果内容太多,文本就会被隐藏在屏幕之外。 (“溢出”CSS 规则不适用,因为日志 div 本身足够大,可以容纳文本,它只是在屏幕外。)
我可以应用哪些样式规则来实现所需的效果?谢谢!
I have a simple BorderContainer set up with a center and bottom region.
<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>
As you can see, the bottom pane is intended to be a log similar to that of the Eclipse IDE. I'd like the log div to take up 100% of the bottom pane (margins are fine), to which I'll be adding splitters later. However, at present it fits its height to its contents and if there is too much content, the text is simply hidden off the screen. (The 'overflow' css rule doesn't apply because the log div itself is big enough to hold the text, it's just off-screen.)
What styling rules can I apply to achieve the desired effect? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
BorderContainer 的规范是必须设置顶部和底部的高度区域(以及左右区域的宽度)这些尺寸是固定的,中心会扩展以占据剩余空间。因此,您至少需要给出一个以高度为起点的样式规则。您的拆分器可以让用户调整大小。
The specification for BorderContainer is that you must set a height on top and bottom regions (and a width on left and right regions) Those dimensions are fixed and the center expands to take the remaining space. So, you need to at least give a style rule with a height for a starting point. Your splitter can let the user resize.