Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HTML-iframe-won';我不能再高了_Html_Iframe - Fatal编程技术网

HTML-iframe-won';我不能再高了

HTML-iframe-won';我不能再高了,html,iframe,Html,Iframe,尝试使用iFrame将博客嵌入我们的html网站: 所有最新的。。。 您的浏览器不支持iFrame 我已经尝试将高度更改为100%,自动,甚至许多固定宽度,但是iframe的高度保持完全相同!有什么帮助吗 提前感谢, Aidan如果使用的是百分比,则包含的元素必须具有高度,否则iFrame将不知道百分比的基础是什么。如果给主体100%的高度,然后给iFrame 100%的高度,它将填充窗口的整个高度 此外,我建议不要使用内联CSS,而是将CSS规则放入CSS文件中 HTML: 必须设置包含d

尝试使用iFrame将博客嵌入我们的html网站:

所有最新的。。。

您的浏览器不支持iFrame

我已经尝试将高度更改为100%,自动,甚至许多固定宽度,但是iframe的高度保持完全相同!有什么帮助吗

提前感谢,


Aidan

如果使用的是百分比,则包含的元素必须具有高度,否则iFrame将不知道百分比的基础是什么。如果给主体100%的高度,然后给iFrame 100%的高度,它将填充窗口的整个高度

此外,我建议不要使用内联CSS,而是将CSS规则放入CSS文件中

HTML:


必须设置包含div的高度。高度自动使用元素所在的容器来设置高度。高度仅在容器中时以百分比表示

<h1 class="title">All the latest...</h1></br>
</div>
    </div>
        </div>
        <div style="height:400px;">
            <iframe src ="http://inspireacademy.tumblr.com" width="100%" height="auto">
                <p>Your browser does not support iframes.</p>
            </iframe>
所有最新的
您的浏览器不支持iFrame

然后,它将缩放到容器。

可能重复的
<h1 class="title">All the latest...</h1></br>
</div>
    </div>
        </div>
        <div style="height:400px;">
            <iframe src ="http://inspireacademy.tumblr.com" width="100%" height="auto">
                <p>Your browser does not support iframes.</p>
            </iframe>
body {
    height:100%;
}
iframe {
    height:100%;
    width:100%;
}
<h1 class="title">All the latest...</h1></br>
</div>
    </div>
        </div>
        <div style="height:400px;">
            <iframe src ="http://inspireacademy.tumblr.com" width="100%" height="auto">
                <p>Your browser does not support iframes.</p>
            </iframe>