除了 YouTube 播放器的大小之外,以下代码运行良好。我无法将其调整为我想要的大小。
我试着把 width="150"
和 height="100"
在 iframe 但什么也没发生。
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item"
src="https://www.youtube.com/embed/q6xWV-uDl5E?autoplay=1" allowfullscreen>
</iframe>
</div>
最佳答案
适合我吗?这是证明这一点的jsfiddle。我也相信你可能会错过px
这就是为什么它不适合你。
JsFiddle
这是代码:
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item"
src="https://www.youtube.com/embed/q6xWV-uDl5E?autoplay=1" width=150px
height=100px allowfullscreen>
</iframe>
</div>
关于html - 引导 iframe 未调整大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47441238/