あなたはiframe内にビデオを入れていると、あなたのレイアウトが流体になりたい場合は、このWebページをご覧ください:Fluid Width Video
映像ソースに応じて、と古い動画を反応させたい場合は、戦術を変更する必要があります。
これはあなたの最初のビデオであれば、ここでは簡単な解決策です:
<div class="videoWrapper">
<!-- Copy & Pasted from YouTube -->
<iframe width="560" height="349" src="http://www.youtube.com/embed/n_dZNLr2cME?rel=0&hd=1" frameborder="0" allowfullscreen></iframe>
</div>
そして、このCSSを追加します。
.videoWrapper {
\t position: relative;
\t padding-bottom: 56.25%; /* 16:9 */
\t padding-top: 25px;
\t height: 0;
}
.videoWrapper iframe {
\t position: absolute;
\t top: 0;
\t left: 0;
\t width: 100%;
\t height: 100%;
}
は、免責事項:これは私のコードではありませんが、テストして結果に満足しています。あなたのウェブページ上のiframeを中央に
を? – Giberno