0
我实现我的这个代码引导视频轮播:自举影音传送带高度
<div class="row">
<h2>Videos</h2>
<hr />
<div class="carousel slide" id="videoCarousel" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#videoCarousel" data-slide-to="0" class="active"></li>
<li data-target="#videoCarousel" data-slide-to="1"></li>
<li data-target="#videoCarousel" data-slide-to="2"></li>
<li data-target="#videoCarousel" data-slide-to="3"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<iframe width="100%" height="100%" src="//www.youtube.com/embed/SEBLt6Kd9EY?controls=0" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
</div>
<div class="item">
<iframe width="100%" height="100%" src="//www.youtube.com/embed/SEBLt6Kd9EY?controls=0" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
</div>
<div class="item">
<iframe width="100%" height="100%" src="https://youtu.be/pVgtPovVSbY" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
</div>
<div class="item">
<iframe width="100%" height="100%" src="//www.youtube.com/embed/SEBLt6Kd9EY?controls=0" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#videoCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#videoCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">c</span>
</a>
</div>
</div>
我使用相同的代码的图像旋转木马和一个我明明使用IMG而不是iframe和标签的元素显示。我只是不明白为什么在视频轮播的情况下,我将视频显示在固定的高度,如果我通过CSS更改视频,则视频始终以相同的高度呈现,但在具有空白空间的框架内呈现。
为了让自己更清晰,我希望轮播展示视频的尺寸为800x600或类似,因为它们在YouTube上。我不熟悉引导程序或使用传送带,所以我想我缺少一些非常基本的东西...
在此先感谢您的帮助!