I have a button that when the mouse passes two buttons are shown, but I have an error that when clicking on a button of the two shown, they are lost. How can I solve this problem?
This is my code:
.stBoton {
padding: 10px;
}
.opciones {
color: red;
display: none;
}
.stBoton:hover + .opciones {
display: block;
}
<div>
<button type="button" class="stBoton">
click
</button>
<div class="opciones">
<button type="button" class="stBoton">
click1
</button>
<button type="button" class="stBoton">
click2
</button>
</div>
</div>
The idea is to keep the two buttons that are shown and that are lost after clicking on one of them. Is it possible with pure CSS?