CSS Popup
Simple :target trick
by vovkasolovev
HTML
<a href="#popup">Нажать</a>
<div id="popup">
<div class="window">
<a href="#" class="close-button" title="Закрыть">×</a>
+7 945 555–12–34
</div>
</div>
CSS
#popup {
width: 100%;
height: 100%;
position: fixed;
background: rgba(0,0,0,.7);
top: 0;
left: 0;
z-index: 9999;
visibility: hidden;
}
.window {
height: 9vw;
width: 60vw;
background: #fff;
position: relative;
padding: 10px;
box-shadow: 0 0 5px rgba(0,0,0,.4);
text-align: center;
margin: 15% auto;
font-size: 7vw;
}
.close-button {
width: 40px;
height: 40px;
background: #fff;
border-radius: 50%;
border: 3px solid #fff;
display: block;
text-align: center;
color: #000;
text-decoration: none;
position: absolute;
top: -10px;
font-size: 50px;
line-height: 35px;
right: -10px;
}
#popup:target {
visibility: visible;
}