1
So I created two div inside each other and my idea was this: I wanted to leave a div inactive, and when I leave the mouse on one, the other appears.
The command I used for this is opacity: 0; to make it invisible and when I leave the mouse on top I put the command opacity: 1; for it to appear. Only that I wanted only when you hover over the div #boot it appears. I can do it for css?
the code is this:
#botao {
position: relative;
float: left;
height: 20px;
width: 20px;
background-image: url(../img/wats.jpg);
margin-top: 7px;
margin-left: 4px;
transition: all 0.5s ease;
}
a.botao-link {
display: block;
height: 100%;
width: 100%;
text-decoration: none;
}
#botao:hover {
background-image: url(../img/wats-hover.jpg);
transition: all 0.1s ease;
}
#comentario {
text-align: center;
position: relative;
top: -22px;
left: 30px;
padding: 2px;
line-height: 20px;
background: #333;
color: #fff;
display: block;
width: 120px;
opacity: 0;
-webkit-transition: all 300ms ease;
-moz-transition: all 300ms ease;
-ms-transition: all 300ms ease;
-o-transition: all 300ms ease;
transition: all 300ms ease;
-moz-border-radius: 7px;
-webkit-border-radius: 7px;
border-radius: 7px;
}
#botao:hover #comentario {
opacity: 1;
<div id="botao"><a href="#" class="wats-link"> botao </a>
<div id="comentario">Comentário</div>
Thank you so much for the tip.
– Wendel Gomes