Hello! There is a spoiler code on pure css
.sub-menu { display: none; } .main-item:focus ~ .sub-menu, .main-item:active ~ .sub-menu, .sub-menu:hover { display: block; } <a class="main-item" href="javascript:void(0);" tabindex="1" >Читайте больше...</a> <div class="sub-menu"> Текст </div>
which has a huge drawback - it is closed not by clicking on the link, but by clicking on any area outside the text. I know that there are many ways to implement the same in Java. But still, it really attracts the simplicity of this implementation, is it possible to refine this code so that it can be buried by clicking on the link and not closed by clicking on it outside the text? I would be very grateful for the help.