Web関連

【Bootstrap】レスポンシブ対応のYouTube埋め込みメモ

投稿日:

<!-- 16:9 aspect ratio -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="..."></iframe>
</div>

<!-- 4:3 aspect ratio -->
<div class="embed-responsive embed-responsive-4by3">
<iframe class="embed-responsive-item" src="..."></iframe>
</div>

http://getbootstrap.com/components/#responsive-embed

何故かこれだと埋め込みができず、

<!-- 16:9 aspect ratio -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="#" frameborder="0" allowfullscreen></iframe>

で解決ヽ(•̀ω•́ )ゝ✧

追記:Word Press(Stinger?)だと、引用のタグで問題がない様子

結論:ダメだったら、frameborder="0" allowfullscreenが入った方を使う

-Web関連

Copyright© シャーレインMiu Blog , 2019 All Rights Reserved.