2017-10-20 91 views
-6

好吧我已經看過所有其他類似的問題,但由於某種原因,我的響應嵌入仍然無法正常工作。響應式視頻嵌入不工作引導3

下面是我在我的HTML `

<div class="embed-responsive embed-responsive-16by9"> 
       <iframe class="embed-responsive-item" src="https://player.vimeo.com/video/7645302?color=ffffff&title=0&byline=0&portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> 
      </div> 

`

+0

這是怎麼回事,如果你設置了一個特定的寬度和高度來響應? – ProEvilz

+1

另外,爲什麼你拍了你的代碼的照片,而不是直接粘貼到你的文章? – ProEvilz

+0

請將您的代碼發佈到您的問題中,而不是感謝鏈接到代碼的圖像。 – TidyDev

回答

0

設置iframe的寬度和高度爲100%。

<div class="container-fluid"> 
    <div class="row"> 
    <div class="col-lg-12"> 
     <div class="embed-responsive embed-responsive-16by9"> 
     <iframe src="https://player.vimeo.com/video/237152408" width="100%" height="100%" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> 
     </div> 
    </div> 
    </div> 
</div> 

這裏的的jsfiddle: https://jsfiddle.net/973Lde7j/6/

+0

謝謝!這雖然有所幫助,但它仍然沒有填充引導線。 –

+0

我更新了代碼,並使用容器流體和col-lg-12來撥弄。如果你無法得到這個工作,請查看[引導網格系統](https://www.tutorialrepublic.com/twitter-bootstrap-tutorial/bootstrap-grid-system.php) – grusl83