gpt4 book ai didi

html - 让 iFrame 达到网站的全宽(不是内容!)

转载 作者:行者123 更新时间:2023-11-28 09:05:21 24 4
gpt4 key购买 nike

我的 iframe 代码如下:

<style type="text/css">
#left {
display: none;
float: left;
width: 212px;
}
#right {
display: block;
float: right;
width: 100%;
}</style>
<div align="left">
<iframe height="1000" src="https://secure.workbooks.com/process/=YjN4gDN/case_portal" width="2000"></iframe></div>

但是我想将 iFrame 区域扩展到页面的整个宽度,因此它会填充如下区域:

full width image

如果我只是增加 iframe 的宽度,我会得到以下结果:

current issue

如何在不遇到第二张图片问题的情况下实现第一张图片?

可以看到页面-here .

最佳答案

首先,增加#content-sub的宽度至 100% (现在是 960px;您的框架是它的子节点之一,因此要将其拉伸(stretch)到全宽,您必须以相同的方式拉伸(stretch)父节点)。二、改iframe如下: <iframe height="1000" src="https://secure.workbooks.com/process/=YjN4gDN/case_portal" style="width:100%"></iframe>

关于html - 让 iFrame 达到网站的全宽(不是内容!),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26732934/

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