How to crop video by height?
-
Hello!
I need to make a background for the site, this background should be a video clip.
If I insert a video with these styles:
.video-background { width: 100%; }
That in height it is not cut off, but remains in height a little more.
Thanks to those who will help me.JavaScript Declan Serrano, May 9, 2020 -
Should help, but older browsers may have problems. Give these properties for the video tag
.video-background {
width: 100%;
height: 100%;
object-fit: cover;
}Anonymous
1 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!