Leave the video occupying 100% of the screen with fixed height

1

People would like to know how to make a video 100% of the screen with fixed height without it being smaller like the image below

TheideaisthatthevideooccupyallthisspaceinlightgrayifIleavethevideowithoutaheight,itstays100%ofthescreenbutitisverybigandifitusesafixedsizeequaltotheimageitstaysofthecorrectheightofthecontainerplusdoesnotstaywiththewidth100%filledfollowsapieceofmycode

<videosrc="http://localhost/trustech/image/catalog/video-academia.mp4" muted="true" autoplay="true" loop="true" style="width: 100%; height: 500px;">
  Your browser does not support the video tag.
</video>
    
asked by anonymous 11.08.2017 / 22:23

1 answer

0

using css

video {
  position: fixed; /*  absolute ou fixed */
  width: 100%;
  z-index: 20;
  height: 100%;
  left: 0px;
  top: 0px;
}

or style

  <video style="position: fixed; /*  absolute ou fixed */width: 100%;z-index: 20;height: 100%;left: 0px;top: 0px;" src="http://localhost/trustech/image/catalog/video-academia.mp4"muted="true" autoplay="true" loop="true" style="width: 100%; height: 500px;">

Your browser does not support the video tag.

    
06.10.2017 / 15:49