gpt4 book ai didi

javascript - 我如何设置 Dojo TitlePane 的高度,相对于外部容器节点的大小?

转载 作者:可可西里 更新时间:2023-11-01 14:53:40 25 4
gpt4 key购买 nike

在下一个示例中,我在 200 像素高度的容器之间创建了一个 TitlePane。我将 TitlePane 高度设置为 100%,但它似乎没有展开。

相关代码:

var titlePane = new TitlePane({
title: "TITLE",
toggleable: false,
style: "height: 100%; overflow-y: auto",
content: "foo"
});
var outerPane = new ContentPane({
content: titlePane,
style: "height: 200px;"
}, dojo.byId("body2"));

完整示例:

http://jsfiddle.net/bzFPM/

有什么想法吗?

最佳答案

添加这个样式

.dijitTitlePaneContentOuter 
{
height:80%;
}

我不确定这是否是最佳选择。但这也是工作。

http://jsfiddle.net/bzFPM/4/

关于javascript - 我如何设置 Dojo TitlePane 的高度,相对于外部容器节点的大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14027829/

25 4 0
文章推荐: hadoop - 如何从配置单元中的特定存储桶中检索数据
文章推荐: css - 如何让右列 (
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com