0
I have a transitional effect on a div that should be applied when I do Hover in another div.
I tried to use some selectors ( +, >) I couldn’t believe it’s the way I’m using them
.box-toogle {
width: 100%;
height: 150px;
top: 0px;
position: relative;
transition: top 1s;
background-color: red;
}
.tgl {
position: relative;
top: 80px;
}
.cubo {
background-color: #0078e1;
border-radius: 50%;
box-shadow: 4px 7px 22px -9px rgba(0,0,0,0.25);
height: 30px;
width: 30px;
position: relative;
top: 90px;
left: 20px;
z-index: 1;
transition: 1s;
line-height: 30px;
text-align: center;
color: #eeeeee;
font-weight: bolder;
font-size: 18px;
cursor: pointer;
}
.cubo:hover {
background-color: #eeeeee;
color: #0078e1;
}
.cubo:hover + .box-toogle {
top: -120px;
}
<div class="box-toogle">
<h3 class="logo">Planejamento de Viagem</h3>
<div class="tgl">
<div >
<p>t>este</p>
</div>
</div>
<div class="cubo">X</div>
</div>
What effect should be realized?
– Euler01
@Euler01 Drive the box-toogle has to move up
– VeteranoKuno1
Don’t use tags that don’t have to do with the problem.
– Guilherme Nascimento