iframe 设置占屏幕高度 100%
给 iframe 元素设置 fixed 定位,并且设置 100% 的宽和高:
iframe { position: fixed; background: #000; border: none; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; }
参考链接:javascript - Full-screen iframe with a height of 100% - Stack Overflow
本文来自博客园,作者:imzhi,转载请注明原文链接:https://www.cnblogs.com/imzhi/p/full-screen-iframe-with-a-height-of-100.html