博客上的Iframe高度为100%

博客上的Iframe高度为100%,iframe,blogger,Iframe,Blogger,如您所见,我的iframe高度调整不起作用,而“宽度100%”正常 我试图在模板和帖子中添加一些不同的代码,但作为一个普通的博客用户,我做不到 谢谢你的帮助 <div style="max-width: 800px; max-height: 800px;"> <div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 56.3%; overflow: hidden;

如您所见,我的iframe高度调整不起作用,而“宽度100%”正常

我试图在模板和帖子中添加一些不同的代码,但作为一个普通的博客用户,我做不到

谢谢你的帮助


<div style="max-width: 800px; max-height: 800px;">
<div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 56.3%; overflow: hidden;">
<iframe src="YOURLINK"
             allowfullscreen
             style="position: absolute; top: 0px; left: 0px; height: 100%; width: 1px; min-width: 100%; *width: 100%;"
             frameborder="0"
             scrolling="no">
</iframe>
</div>
</div>

多亏了这个代码,我解决了我的问题。它以响应的方式安排“高度”,您可以另外调整内容维度。

可能重复感谢您的评论!我尝试了第一种解决方案,但对我来说不起作用。我的意思是,我在模板中添加了脚本,根据我的编码经验,我只能这样做:(。我甚至不了解其他解决方案。