-1
Hello, I’m creating the home of a site that has a full-screen video that automatically plays but with the video in full screen even with the z-index the links are not clickable as you can see, how do I solve this?
*{
margin: 0;
padding: 0;
}
.bloco{
width: 100vw;
height: 100vh;
justify-content: center;
align-items: center;
display: flex;
}
.links{
width: 100%;
height: 50px;
z-index: 100;
position: fixed;
display: flex;
}
.links label{
z-index: 101;
padding: 10px 0;
flex-grow: 1;
cursor: pointer;
transition: all .4s;
text-align: center;
font-family: 'Arial';
font-size: 100%;
color: #fff;
}
.links label:hover{
background-color: rgba(255,255,255,.2);
}
.scroll input{
display: none;
}
#home{
background-color: #7fbd42;
}
#login{
background-color: #7c2096;
}
#register{
background-color: #414950;
}
#contact{
background-color: #aaa;
}
#news{
background-color: #7fbd42;
}
.scroll{
display: flex;
width: 100vw;
height: 100vh;
overflow: hidden;
}
.sections{
transition: all .4s;
}
#rd_login:checked ~ .sections{
margin-top: -100vh;
}
#rd_register:checked ~ .sections{
margin-top: -200vh;
}
#rd_contact:checked ~ .sections{
margin-top: -300vh;
}
#rd_news:checked ~ .sections{
margin-top: -400vh;
}
#bg{
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
background-cover: cover;
}
#content{
position: absolute;
top: 20px;
padding: 30px;
color: #fff;
text-shadow: #000 2px 2px 2px;
font-family: Arial;
}
<nav class="links">
<label for="rd_pi">Pagina Inicial</label>
<label for="rd_login">Login</label>
<label for="rd_register">Registrar-me</label>
<label for="rd_contact">Entrar em Contato</label>
<label for="rd_news">Novidades</label>
</nav>
<div class="scroll">
<input type="radio" name="grupo_menu" id="rd_pi" checked="true">
<input type="radio" name="grupo_menu" id="rd_login">
<input type="radio" name="grupo_menu" id="rd_register">
<input type="radio" name="grupo_menu" id="rd_contact">
<input type="radio" name="grupo_menu" id="rd_news">
<section class="sections">
<section class="bloco" id="home">
<video id="bg" src="https://www.quirksmode.org/html5/videos/big_buck_bunny.mp4" autoplay="" loop="true"></video>
</section>
<section class="bloco" id="login"></section>
<section class="bloco" id="register"></section>
<section class="bloco" id="contact"></section>
<section class="bloco" id="news"></section>
</section>
</div>
I am following the following tutorial : TUTORIAL
Your navigation list does not have
<a>
with respective attributeshref
logo has not links but text only.– Isac
This page does not work with <a> but with <label> and each label is associated with a radio button that in css when checked from a margin-top to the content the user wants to see, following the one-page model
– IMM Telecom
The problem is
position:fixed
of the video, which makes you always on top of everything. Besidesbackground-cover
does not exist, and would bebackground-size
but only applicable to the same background. "links" have always been clickable.– Isac