我确实让这段代码在没有滚动条的情况下工作。并且仍然显示来自 iframe 中链接的所有内容。
<html>
<head>
<title>How to make Iframe Responsive</title>
</head>
<body>
<div style="padding-bottom:56.25%; position:relative; display:block; width: 100%">
<iframe width="100%" height="100%" src="https://www.inflatableoffice.com/quotes/quoteme.php name=Starwalk+of+Dallas%2C+LLC" frameborder="0" allowfullscreen="" style="position:absolute; top:0; left: 0"></iframe>
</div>
</body>
</html>
我希望它在没有侧边栏的情况下显示。
最佳答案
在 iframe 标签中添加 scrolling="no"
属性。
<iframe scrolling="no" ...></iframe>
关于javascript - 如何使 iframe 响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53921431/