Bootstrap 4视频嵌入无法正常工作

时间:2018-02-23 22:09:19

标签: html css bootstrap-4

我按照文档编写并研究了其他问题,但无法弄清楚它为什么不起作用。

以下是代码:

Error encountered while pushing to the remote repository: Git failed with a fatal error.
fatal: HttpRequestException encountered.
   An error occurred while sending the request.
error: cannot spawn askpass: No such file or directory
fatal: could not read Username for 'https://github.com': terminal prompts disabled

此外,您可以在以下位置获得它的实时预览:VisViresGaming.com,位于底部。

1 个答案:

答案 0 :(得分:0)

您的代码中缺少类embed-responsive-16by9

点击下面的“运行代码段”并展开到完整页面进行测试:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

<div class="container">
    <div class="row">
        <div class="col">
            <h3 class="text-center text-primary py-3 text-uppercase">Our Twitch Streamers</h3>
            <div class="embed-responsive embed-responsive-16by9">
                <iframe class="embed-responsive-item" src="https://player.twitch.tv/?channel=visviresgames" allowfullscreen></iframe>
            </div>
            <h3 class="text-center text-primary py-3 text-uppercase">Our Youtube Channel</h3>
            <div class="embed-responsive embed-responsive-16by9">
                <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/k5JqHLbZP_0" allowfullscreen></iframe>
            </div>
        </div>
    </div>
</div>

注意:视频本身不会在此处加载,因为SO不允许第三方iframe嵌入,但您将能够看到并验证它的响应能力是否有效

编辑:

刚刚在您的网站上测试过(通过网络开发工具)并添加了embed-responsive-16by9类(如上面的代码段中所示),也可以解决问题。