2014-02-14 157 views

回答

17

responsive embed component增加了release of Bootstrap 3.2.0

<!-- 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> 
+0

這應該是更新的答案。 –

5

查看「Responsive video CSS」 - Source Code on github

這是working demo on Bootply。點擊運行,看到它調整了不同的屏幕尺寸。

<section class="row"> 
    <div class="span6"> 
    <div class="flex-video widescreen"><iframe src="https://www.linktoyourvideo.com/..." frameborder="0" allowfullscreen=""></iframe></div> 
    </div> 
    <div class="span6"> 
    ... 
    </div> 
</section> 
12

對HTML5視頻的最簡單方法是添加類=「IMG IMG響應」視頻標籤:

<video controls class="img img-responsive"> 
1

退房的響應,embedd.css位於存檔。應用該類.embed響應您的嵌入容器或您希望的任何其他類。

相關問題