Can you display HTML5 <video> as a full screen background?

后端 未结 3 1926
被撕碎了的回忆
被撕碎了的回忆 2020-12-07 14:11

How can you display HTML5 as a full screen background to your website? Similar to this Flash site demo...

http://activeden.net/item/full-s

3条回答
  •  醉话见心
    2020-12-07 14:52

    Just a comment on this - I've used HTML5 video for a full-screen background and it works a treat - but make sure to use either Height:100% and width:auto or the other way around - to ensure you keep aspect ratio.

    As for Ipads -you can (apparently) do this, by having a hidden and then forcing the click event to fire, and having the function of the click event kick off the Load/Play().

    P.s - this shouldn't require any plugins and can be done with minimal JS - If you're targeting any mobile device (I would assume you might be..) staying away from any such framework is the way forward.

提交回复
热议问题