【问题标题】:Is it possible to set an Instagram or Vine video as your html background? [duplicate]是否可以将 Instagram 或 Vine 视频设置为您的 html 背景? [复制]
【发布时间】:2015-06-28 00:28:14
【问题描述】:

我正在想办法将 Instagram 视频作为我的网站背景。是否可以将 Instagram 或 Vine 视频作为背景?如果有,怎么做?

【问题讨论】:

    标签: html html5-video instagram


    【解决方案1】:

    不能直接使用,但可以使用固定位置的视频和绝对位置的前景,例如:

    <video style="margin 0 0 0 0;position:fixed;left:0;top:0;min-width:100%;min-height:100%" autoplay loop>
        <source src="yourvid.mp4" type="video/mp4">
        <source src="yourvid.ogg" type="video/ogg">
    </video>
    
    <div style="position:absolute;left:0;top:0;width:100%;height:100%">
        <h1 style="text-align:center">YOUR PAGE HERE</h1>
    </div>
    

    不幸的是,视频将保持其纵横比,这就是我使用min-widthmin-height 填充整个背景的原因。

    【讨论】:

      猜你喜欢
      • 2015-12-29
      • 1970-01-01
      • 1970-01-01
      • 2014-10-19
      • 2013-08-02
      • 1970-01-01
      • 2011-06-24
      • 1970-01-01
      • 2019-07-28
      相关资源
      最近更新 更多