my function is to hide and show the div with pure css , but when I click the "Open" button, the button still does not disappear.
<a href="#show" id="open" class="btn btn-default btn-sm">Open</a>
<div id="show">
some text...
<a href="#hide" id="close" class="btn btn-default btn-sm">Close</a>
</div>
and css look like this:
<style>
#show {display: none; }
#show:target { display: inline-block; }
#hide:target ~ #show { display: none; }
<style>
when i add this:
#show:target ~ #open { display: none; }
the button #open
is still not hiding anyone can help me.
thanks before :)
source
share