Home › Forums › CSS › [Solved] show/hide overlapping images with click event › Reply To: show/hide overlapping images with click event
November 21, 2013 at 11:04 am
#156822
Alex
Participant
Your best bet would be to just use Javascript, but you could do something like this:
HTML:
<div>
<a class="a"href="#">Hey</a>
<a class="b" href="#">Howdy</a>
</div>
CSS:
div {position:relative;}
.a{position:absolute;}
.b{position:absolute; visibility:hidden;}
.a:active {visibility:hidden;}
.a:active + .b {visibility:visible;}
Although I’m not sure if that will produce the results you want, you’d have to hold the mouse button down.