gpt4 book ai didi

css - iFrame 不会将父容器

转载 作者:太空宇宙 更新时间:2023-11-04 04:33:50 25 4
gpt4 key购买 nike

我有一个 absolute 定位的 div,里面有一个 iFrame(也不适用于 silverlight 对象)。由于某种原因,它没有扩展以填充其父级,而它应该这样做。

如果您将 iframe 替换为具有相同 ID 的 div,它会正常工作。有什么问题?

<div id="rightpanel">
<iframe id="silverlightControlHost" src="http://google.com"></iframe>
</div>

#rightpanel {
background: green;
top: 32px;
left: 190px;
bottom: 0;
padding: 20px!important;
position: absolute;
padding-top: 0px;
overflow: auto;
min-width: 700px;
}

#silverlightControlHost {
background: red;
border: 0;
position: absolute;
left: 0;
top: 0;
z-index: 1;
right: 0;
bottom: 0;
}

http://jsfiddle.net/ZfG3g/

最佳答案

在 iframe 上粘贴以下内容似乎有效(至少在 fiddle 中):

#silverlightControlHost {
width:100%;
height:100%;
... rest of your css ...
}

http://jsfiddle.net/ZfG3g/1/

关于css - iFrame 不会将父容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16737462/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com