【问题标题】:embedding a youtube video in Responsive Grid System framework (video doesn't load)在响应式网格系统框架中嵌入 youtube 视频(视频不加载)
【发布时间】:2015-03-02 10:27:00
【问题描述】:

所以我正在为我的学位编写一个评估网站,并且我遇到了少数需要修复的元素之一。这正在加载 YouTube 嵌入视频。现在我把它归结为只有一个损坏的视频。

这已在我的课程讲师批准的http://www.responsivegridsystem.com/ 上使用。为了快速给出一个思路,我希望将第一个视频放在右边,左边是描述,第二个视频放在 let,右边是描述,第三个视频就像首先。

下面的代码:

<!--content-->

    <div id="maincontentcontainer">
        <div class="standardcontainer" id="example">
            <div class="maincontent">


                <div class="section group">
                    <div class="col span_1_of_3">
                    <h3>Sesame Street: Do De Duckie With Ernie</h3>
                    <p></p>
                    </div>
                    <div class="col span_2_of_3">
<iframe width="480" height="360" src="http://www.youtube-nocookie.com/embed/W6_d22aMqZs?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen </iframe>
                    </div>
                </div>       

<!--next video-->

                <div class="section group">
                    <div class="col span_2_of_3">
<iframe width="560" height="315" src="http://www.youtube-nocookie.com/embed/gRfPqV6L2MA?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen </iframe>
                    </div>
                    <div class="col span_1_of_3">
                    <h3>Is It A Good Idea To Microwave Rubber Ducks?</h3>
                    <p></p>
                    </div>
                </div>

<!--next video-->

                <div class="section group">
                    <div class="col span_1_of_3">
                    <h3>Dany T - Rubber Ducky (Official Teaser)</h3>
                    <p></p>
                    </div>
                    <div class="col span_2_of_3">
<iframe width="560" height="315" src="http://www.youtube-nocookie.com/embed/TDLxEWelXsE?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen </iframe>
                    </div>
                </div>  
            </div>
        </div>
    </div>

当我在 Chrome(我的主要测试浏览器)中试用页面时实际发生了什么,只有第一个和第三个视频被加载,而第二个视频不存在。

任何帮助???

【问题讨论】:

    标签: html video youtube responsive-design grid


    【解决方案1】:

    你没有正确关闭你的iframes:

    这个:

    <iframe width="480" height="360" src="http://www.youtube-nocookie.com/embed/W6_d22aMqZs?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen </iframe>
    

    应该是这样的:

    <iframe width="480" height="360" src="http://www.youtube-nocookie.com/embed/W6_d22aMqZs?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
    

    为了演示没有所有其他代码,你的代码是:

    <iframe </iframe>
    

    而不是

    <iframe></iframe>
    

    他们三个都是这样的

    FIDDLE

    【讨论】:

    • 那是什么 ;D...谢谢兄弟,这只是困扰我..我不明白,因为那是从 YouTube 嵌入式网站复制的代码...无论哪种方式,谢谢!!
    • @Intramista 你明白了。乐意效劳。您可以将其勾选为已解决吗?
    猜你喜欢
    • 1970-01-01
    • 2015-10-25
    • 1970-01-01
    • 1970-01-01
    • 2014-04-29
    • 1970-01-01
    • 2018-04-05
    • 2014-04-02
    • 2016-12-22
    相关资源
    最近更新 更多