【问题标题】:HTML <iframe> issueHTML <iframe> 问题
【发布时间】:2015-04-15 17:06:11
【问题描述】:

目前我的情况是我想使用 iframe 在网页中显示一些视频。但是它只显示 1 个视频而不是 10 个。我不确定这里出了什么问题,但是当我将第一个 iframe src="..." 的相同链接放入 第二个 iframe src="..." 视频将显示。仅供参考,我也尝试使用 objectembed 但这两种方法似乎都不起作用。这是youtube的问题还是什么?下面是我的代码。这是我的代码。谢谢。 :)

<div class="box text-shadow">
                 <table class="demo-tbl"><!--<item>1</item>-->
                 <tr class="tbl-item"><!--<img/>-->
                 <td class=""><iframe width="250" height="250" src="https://www.youtube.com/embed/Nn2eWc4PxhM" frameborder="0" allowfullscreen>
                                                    </iframe></td>
                 <!--<data></data>-->
                 <td class="td-block"><p class="date">03/15/2012</p>

                 <p class="title">Arch</p>

                 <p class="desc">An arch is a structure that spans a space and
                                                    supports a load. Arches appeared as early as the 2nd millennium
                                                    BC in Mesopotamian brick architecture and their systematic use
                                                    started with the Ancient Romans who were the first to apply the
                                                    technique to a wide range of structures.</p>

                 <p class="like">5 Likes</p></td>
                 </tr>
                 <!--<item>2</item>-->
                 <tr class="tbl-item"><!--<img/>-->
                 <td class=""><iframe width="250" height="250" src="https://www.youtube.com/watch?v=ijxB1NBvLEc" frameborder="0" allowfullscreen></iframe></td>
                 <!--<data></data>-->
                 <td class="td-block"><p class="date">03/18/2012</p>

                 <p class="title">Architecture</p>

                 <p class="desc">Architecture is both the process and product of
                                                    planning, designing and construction. Architectural works, in
                                                    the material form of buildings, are often perceived as cultural
                                                    symbols and as works of art. Historical civilizations are often
                                                    identified with their surviving architectural achievements.</p>

                 <p class="like">25 Likes</p></td>
                 </tr>
                 <!--<item>3</item>-->
                 <tr class="tbl-item"><!--<img/>-->
                 <td class=""><iframe width="250" height="250" src="https://www.youtube.com/watch?v=X-8T7707U4w" frameborder="0" allowfullscreen>
                 </iframe></td>
                 <!--<data></data>-->
                 <td class="td-block"><p class="date">01/16/2011</p>

                 <p class="title">Autumn</p>

                 <p class="desc">Autumn or Fall is one of the four temperate seasons.
                                                    Autumn marks the transition from summer into winter, in
                                                    September (Northern Hemisphere) or March (Southern Hemisphere)
                                                    when the arrival of night becomes noticeably earlier. The
                                                    equinoxes might be expected to be in the middle of their
                                                    respective seasons, but temperature lag (caused by the thermal
                                                    latency of the ground and sea) means that seasons appear later
                                                    than dates calculated from a purely astronomical
                                                    perspective.</p>

                 <p class="like">12 Likes</p></td>
                 </tr>
                 </table>
</div>

【问题讨论】:

    标签: html iframe


    【解决方案1】:

    首先,您的第一个关闭&lt;/iframe&gt; 标记中有错字,请检查您的代码,您写了&lt;/iframe,没有“&gt;”。其次,请注意您如何在第一个 iframe 中使用“嵌入”链接,而在第二个和第三个 iframe 中使用“观看”链接?用嵌入改变它,你很高兴。演示:http://jsfiddle.net/qrqL8tj2/1/

    示例链接:

    https://www.youtube.com/embed/Nn2eWc4PxhM
    

    【讨论】:

    • 抱歉,当我尝试在此处编辑代码时,我似乎是一个错字。我已经编辑了问题。
    • 当然有,查看jsfiddle链接,我可以清楚地看到三个视频-jsfiddle.net/qrqL8tj2/1
    • 天哪嵌入。谢谢先生。 :)
    【解决方案2】:

    在 .您提供的来源不正确。您的 src 格式应为 > https://www.youtube.com/embed/PQgWnRe9trwcopy 您需要来自 youtube 嵌入选项的链接。

    【讨论】:

    • 这不是和我一样的答案吗?
    • 非常感谢先生。那个 embed 东西不见了,现在它可以工作了。干杯! :)
    • 我得到的解决方案是我写的。
    猜你喜欢
    • 1970-01-01
    • 2012-05-15
    • 1970-01-01
    • 2011-04-25
    • 2017-07-08
    • 2016-09-16
    • 2011-08-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多