Witam, postanowiłem zrobić video jako tło, znalazłem w necie taki kod (poniżej) ale działa (tzn, video odtwarza sie i zapętla) tylko w Mirosoft Edge i Firefoxie, natomiast nie działa w operze ani w brave ( jedyne co pokazuje to zatrzymany początek video)
Wszystkie odnośniki video są poprawnie umieszczone
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Video jako tło</title>
<style>
:root {
font-size: calc(1vw + 1vh + .2vmin);
}
body {
background: #111;
font: 1rem/1.1 "Montserrat", sans-serif;
margin: 0;
}
section {
height: 100vh;
overflow: hidden;
position: relative;
}
video {
left: 50%;
min-height: 100%;
min-width: 100%;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
}
.vignette {
background: rgba(0, 0, 0, 0.6);
height: 100%;
left: 0;
position: fixed;
top: 0;
width: 100%;
z-index: 1;
}
h1 {
color: #fff;
font-size: 4rem;
margin: 3rem;
position: absolute;
text-transform: uppercase;
width: 100%;
z-index: 2;
}
</style>
</head>
<body>
<section>
<div class="vignette"></div>
<h1>Advertising.<br>Digital.<br>Social.</h1>
<video autoplay="autoplay" loop="loop">
<source id="video" src="xBomb/XBOMBmp4.mp4" type="video/mp4">
<source id="video" src="xBomb/XBOMBwebm.webm" type="video/webm">
</video>
</section>
</body>
</html>