【问题标题】:how many youtube videos can be embed in my website我的网站可以嵌入多少个 youtube 视频
【发布时间】:2015-06-22 14:38:47
【问题描述】:

我的网站可以嵌入多少个 YouTube 视频?我嵌入了视频 3,不幸的是,没有一个视频显示第一个视频包含在页面中,其余的没有显示

<iframe id="ytplayer" type="text/html" width="420" height="315"  style="position:relative;z-index:1 !important;" 
src="https://www.youtube.com/embed/YlDAzMpbZso"
frameborder="0" allowfullscreen></iframe>

<iframe id="ytplayer" type="text/html" width="420" height="315"  style="position:relative;z-index:1 !important;" 
src="https://www.youtube.com/embed/YlDAzMpbZso"
frameborder="0" allowfullscreen></iframe>

<iframe id="ytplayer" type="text/html" width="420" height="315"  style="position:relative;z-index:1 !important;" 
src="https://www.youtube.com/embed/YlDAzMpbZso"
frameborder="0" allowfullscreen></iframe>

【问题讨论】:

  • 请向我们展示您的尝试。
  • 我编辑了他的问题,嘿写了代码,但他没有将其标记为代码。所以它没有显示给我们。

标签: iframe youtube html5-video embed


【解决方案1】:

您不能有多个元素具有相同的id。那是无效的 HMTL。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-03-25
    • 2017-06-27
    • 2015-07-24
    • 2011-12-04
    • 2016-03-20
    • 1970-01-01
    • 2011-11-28
    • 1970-01-01
    相关资源
    最近更新 更多