這裏的HTML:填充底部,最大高度
<div class="container">
<div class="wrapper">
<iframe src="...."></iframe>
</div>
</div>
的包裝div有CSS: 位置:親屬; 寬度:100%; 身高:100%; 身高:0; 填充底:56.25%; 溢出:隱藏;
iframe的有CSS:
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
border: 0;
容器具有CSS:
position: relative;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
margin: 0 auto;
top: 50%;
transform: translateY(-50%);
max-width: 1280px;
max-height: 720px;
我試圖保護寬高比16:iframe的作爲調整窗口大小,並保持9它的最大高度爲100% - 67px calc(100% - 67px)。我怎麼能在同一時間做這兩個?
請提供iframe的鏈接,並解釋更多,如果你能 – Microsmsm