Is there an analogue background-sive: cover for video? On my site, only the top of the video is shown, but it is necessary that the central part is displayed.

    1 answer 1

    Here you have a ready-made solution to the video.

    .top-video { position: relative; width: 100%; padding-bottom: 40%; overflow: hidden; } #video-background { position: absolute; left: 0; top: 50%; transform: translate(0, -50%); -webkit-transform: translate(0, -50%); -moz-transform: translate(0, -50%); -o-transform: translate(0, -50%); -ms-transform: translate(0, -50%); width: 100% !important; min-height: 100%; width: auto; height: auto; z-index: 1; } 
     <div class="top-video"> <video autoplay="" loop="" id="video-background" muted=""> <source src="http://duetdress.com/video.mp4" type="video/mp4"> </video> </div>