I'm using HTML5
which in turn has a tag called <video>
but I'm having a hard time using my video in the header of my site because I can not manipulate my video correctly I would like my video to stay like the site
I even have to put the values of the height in my code soon if I get a smaller screen the video becomes great if I put in a bigger screen my video becomes small realize that the video of this site there he is self adjustable and he is always 100% of width and height follows an example of the way I did it, but not very sure, because cast height values with the tag transform:scale();
I think it's wrong:
header {
position: relative;
top: 0;
overflow: hidden;
width: 100%;
height: 90%;
min-height: 850px;
}
video {
height: 760.4375px;
width: 100%;
z-index: -10;
top: 0;
left: 0;
-webkit-transform: scaley(1.72);
-o-transform: scaley(1.72);
-ms-transform: scaley(1.72);
-moz-transform: scaley(1.72);
transform: scaley(1.72);
z-index: -2;
position: absolute;
}
#bg-video {
overflow-y: hidden;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url(../images/overlay.png);
z-index: 1
}
.texto-header {
position: absolute;
top: 20%;
left: 50%;
margin-left: -280px;
width: 630px;
text-align: center;
z-index: 2;
color: #FFF;
}
.texto-header h1 {
font-family: Gabriola;
font-size: 4em;
}
.texto-header strong {
color: #f80;
}
.texto-header p {
/*font-family: 'Scada', sans-serif;*/
font-family: Gabriola;
font-size: 1.2em;
line-height: 20px;
margin-top: -5%;
}
.texto-header a {
color: #fff;
background: transparent;
border: 2px solid #fff;
padding: 13px;
font-family: Gabriola;
font-size: 1.2em;
border-radius: 5px;
}
.texto-header a:hover {
color: #000;
background-color: #fff;
}
<header>
<div id="video">
<video id="Video1" class="bgvid" loop autoplay>
<source src="video/League-warrios.mp4" type="video/mp4" />desculpe mais seu navegador não suporta este formato ou esta desatualizado :(
</video>
</div>
<div id="bg-video"></div>
<div class="texto-header">
<h1>Olá amigos somos a <strong>Nova Era !</strong></h1>
<p>dolor sit amet, consectetur adipiscing elit. Sed at risus neque.
<br>Cras sit amet ligula ut justo commodo porta id ut enim. Nulla est lectus, mollis sit amet vehicula id, volutpat eget mauris.</p>
<br/>
<a href="#circulo">Então podemos começar ???</a>
</div>
</header>
NOTE: My video has a background like the one mentioned above that is called overlay and I do not care if I have to manipulate the video via java script because I no longer know what to do to get the result I want. >