gpt4 book ai didi

twitter-bootstrap-3 - 嵌入自适应YouTube视频未显示

转载 作者:行者123 更新时间:2023-12-03 05:46:37 31 4
gpt4 key购买 nike

我正在使用 bootstrap ,我想将youtube上的一些视频添加到我的网站。我已经看到here可以执行此操作的一些代码,但是当我尝试here尝试不起作用时,则不会显示该视频。

这是代码:

HTML

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">

<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>

<!-- 16:9 aspect ratio -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="https://www.youtube.com/watch?v=PIh2xe4jnpk"></iframe>
</div>

<!-- 4:3 aspect ratio -->
<div class="embed-responsive embed-responsive-4by3">
<iframe class="embed-responsive-item" src="https://www.youtube.com/watch?v=PIh2xe4jnpk"></iframe>
</div>

最佳答案

您输入了错误的youtube URL。您需要嵌入视频...

<!-- 16:9 aspect ratio -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/PIh2xe4jnpk"></iframe>
</div>
<!-- 4:3 aspect ratio -->
<div class="embed-responsive embed-responsive-4by3">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/PIh2xe4jnpk"></iframe>
</div>

关于twitter-bootstrap-3 - 嵌入自适应YouTube视频未显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29794448/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com