So, I have this modal that appears with the CSS: target selector. However, when you click on the page, you go to the anchor. I would like the page not to go into the selector :. How can i do this?
<a href="#openModal">Info</a> <div id="openModal" class="modalDialog">
CSS
.modalDialog { position: absolute; pointer-events: none; z-index: 99999; opacity:0; } .modalDialog:target { opacity:1; pointer-events: auto; } .modalDialog > div { width: 900px; height: 506px; position: relative; background: rgba(0,0,0,0.9); }
css
jick
source share