完整宽度和高度响应嵌入式YouTube视频

时间:2015-11-14 21:33:09

标签: html css responsive-design youtube embedding

我正在处理一个项目,如果你向下滚动到"什么是RoadAware"部分你可以看到一个看起来很糟糕的YouTube视频嵌入!我需要视频来填充"左右" div 100%匹配" about-right" DIV。我一直在努力寻找答案,非常感谢任何帮助!

http://road-aware.herokuapp.com/

1 个答案:

答案 0 :(得分:0)

embed-responsive embed-responsive-4by3添加到您的video-wrapper班级

来自 bootstrap

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