Модальное окно css
HTML
<a href="#openModal">Open Modal</a>
<div id="openModal" class="modalDialog">
<div>
<a class="close" title="Close" href="#close">X</a>
<h2>Modal Box</h2>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>You could do a lot of things here like have a pop-up ad that shows when your webs
ite loads, or creata login/register form for users.
</p>
</div>
</div>
<a href = "#openAsdf">asdf</a>
<a id = "openAsdf" href = "#close">d
</a>
<div class = "modalAsdf">
asdf
</div>
CSS
.modalDialog {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.8);
bottom: 0;
font-family: Arial,Helvetica,sans-serif;
left: 0;
opacity: 0;
pointer-events: none;
position: fixed;
right: 0;
top: 0;
transition: opacity 400ms ease-in 0s;
z-index: 99999;
}
.modalDialog:target {
opacity: 1;
pointer-events: auto;
}
.modalDialog > div {
background: linear-gradient(#fff, #999) repeat scroll 0 0 rgba(0, 0, 0, 0);
border-radius: 10px;
margin: 10% auto;
padding: 5px 20px 13px;
position: relative;
width: 400px;
}
.close {
background: none repeat scroll 0 0 #606061;
border-radius: 12px;
box-shadow: 1px 1px 3px #000;
color: #ffffff;
font-weight: bold;
line-height: 25px;
position: absolute;
right: -12px;
text-align: center;
text-decoration: none;
top: -10px;
width: 24px;
}
.close:hover {
background: none repeat scroll 0 0 #00d9ff;
}
#openAsdf {
border: 1px solid green;
display: block;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, .5)
}