Answers for "video failing to scale with div css background"

CSS
0

video failing to scale with div css background

/* The object-fit property defines how an element responds to the height 
and width of its content box.*/

/* A box you would like to place the video in*/
.wrapper {
  width: 600px
  height: 300px;
}

.wrapper_video > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
Posted by: Guest on July-17-2021
0

video failing to scale with div css background

/* Using fill-available on the max-width property */

/* A box you would like to place the video in*/
.wrapper {
  width: 600px
  height: 300px;
}

.wrapper_video > video {
  width: 100%;
  max-width: -webkit-fill-available;
  max-width: fill-available;
}
Posted by: Guest on July-17-2021

Browse Popular Code Answers by Language