0

I'm trying to figure out a way to have an Instagram video as my website background. Is it possible to place an Instagram or Vine video as a background? If so, how?

Corey Blinks
  • 57
  • 1
  • 1
  • 4

1 Answers1

0

Not directly, but you can use video in fixed position and foreground in absolute position, for example:

<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>

Unfortunately the vid will keep its aspect ratio, that's why I used min-width and min-height to fill entire background with it.

ZygD
  • 22,092
  • 39
  • 79
  • 102
lackjaw
  • 46
  • 3