使用iframe标签时遇到个问,iframe标签限制了被嵌入页面的比例大小,试了半天才解决问题。
.iframe-communication {
height: 80vh; /* 限制iframe的显示高度 或使用px */
}
.iframe-communication iframe {
border: none;
width: 100%; /* 填满 */
height: 130%; /* 限制多少拉长多少 */
}
<div class="iframe-communication">
<iframe id="communication" src=""></iframe>
</div>