【问题标题】:youtube video play in background html filesyoutube 视频在后台 html 文件中播放
【发布时间】:2017-01-05 09:48:33
【问题描述】:

我对我们在https://www.laitkor.com/ 等网页上看到的背景视频很着迷,我想开发类似的东西,但这次我从 Youtube 获取视频。我该怎么做? 附:视频应该会自动播放。

【问题讨论】:

  • 请不要那样做。这 a) 非常烦人,b) 对带宽限额上限的人非常不公平。
  • 其实是我的项目,只是为了美化,网站不对外开放。
  • 这个问题太宽泛,不够具体。

标签: php html youtube-api


【解决方案1】:

这是嵌入 YouTube 视频作为网页背景的方法:

<div style="position: fixed; width: 100%; height: 100%; z-index: -999;">
  <iframe frameborder="0" height="100%" width="100%" src="https://youtube.com/embed/[videoID]?autoplay=1&controls=0&showinfo=0&autohide=1">
  </iframe>
</div>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-03-02
    • 2019-07-03
    • 1970-01-01
    • 2023-03-06
    • 2013-07-27
    • 2014-12-02
    • 2023-04-06
    • 2014-05-01
    相关资源
    最近更新 更多