Bootstrap video jumbotron

后端 未结 2 1126
滥情空心
滥情空心 2021-01-07 11:04

I\'m trying to get a video to cover a bootstrap Jumbotron with no success. This seems like a very simple thing to do, but everything I try seems to fail.

I\'ve tried

2条回答
  •  粉色の甜心
    2021-01-07 11:20

    Looks like you've got a lot of unnecessary css going on. To start I would definitely define the jumbotron z-index in order to keep the gray padding in the background.

    .jumbotron{
      position: relative;
      z-index:-101;
    }
    

    Next some cleaner simpler code for the video background like so:

        #video-background { 
          position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            overflow: hidden;
            z-index: -100;
            width:100%;
    }
    

    Here's the fiddle https://jsfiddle.net/kae4q601/5/ Let me know if this is what you were trying to achieve.

提交回复
热议问题