Is there a way to position a video that I put in the background of my html page and make it repeat as I would do with an image/gif using the background-*
css properties? I'm sure this isn't possible with the current version of CSS but maybe there is a way to do it with JavaScript. The video was originally a gif, and what I am trying to do works with a gif, but I converted it to a webm and mp4 to improve load performance and save bandwidth. Below is code of what I would do if my video was a gif and then there is code of what I have currently and want to replicate the code for "Video as Gif".
Video as Gif
body {
background: url('https://media3.giphy.com/media/KZFrf9JusXzmpnPsT6/giphy.gif?cid=ecf05e47nlo6zhk89xm58aaee38kzq5tddoko195kri6hv0e&rid=giphy.gif') center center;
background-repeat: repeat;
position: relative;
background-size: auto;
overflow: hidden;
width: 100%;
}
<html>
<body>
</body>
</html>
Gif as Video
#video-background {
top: 0;
left: 0;
position: absolute;
width: 100%;
height: 100%;
background-repeat: repeat;
overflow: hidden;
}
<div id="video-background">
<video aria-hidden="true" playsinline="" autoplay="" muted="" loop=""> <source src="//starlink.ua/media/mod_starlink/car-blur.webm" type="video/webm"> <source src="//starlink.ua/media/mod_starlink/car-blur.mp4" type="video/mp4"></video>
</div>