Fullscreen background video and keep it centered

前端 未结 4 447
梦谈多话
梦谈多话 2021-01-11 17:13

I\'m trying to create a site where I have a background video playing with some HTML5. This is all working perfectly, it works just the way I want it. But I also want to keep

4条回答
  •  伪装坚强ぢ
    2021-01-11 17:45

    This should make #video the entire size of the viewport and remain there when the user scrolls.

    #video {
       position: fixed;
       top: 0;
       right: 0;
       bottom: 0;
       left: 0;
    }
    

提交回复
热议问题