<header></header>
<header></header>
<main>
<article>
<h2>Header</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quibusdam voluptatum harum ipsa nobis ex fugiat cum explicabo similique sequi deserunt repudiandae delectus recusandae doloribus porro eius perspiciatis sint dignissimos sed.</p>
<button>Toggle modal</button>
</article>
</main>
<div class="popup-wrapper">
<div class="popup-container">
<article class="popup-body">
<h2>Header</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis reprehenderit eius consequuntur optio. Vero incidunt deserunt quidem inventore maxime illum facere beatae maiores dignissimos aperiam nobis autem perspiciatis minus iste!</p>
<button class="flat">agree</button>
<button class="flat">disagree</button>
</article>
</div>
</div>
<script class="cssdeck" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
* {box-sizing: border- box;}
* {box-sizing: border-box;}
html, body {
height: 100%;
background-color: #303030;
font-family: Roboto;
color: rgba(255, 255, 255, .87);
}
header {
background: #212121;
height: 56px;
}
main {
padding: 16px;
}
article {
padding: 16px;
border-radius: 2px;
background-color: #424242;
box-shadow: 0 0 4px rgba(0, 0, 0, .1),
0 4px 4px rgba(0, 0, 0, .1);
text-align: justify;
filter: blur(0px);
filter: blur(0px);
}
h1, h2 {
margin: 0;
line-height: 1.6;
font-weight: 300;
}
p {
font-size: 13px;
line-height: 1.6;
}
button {
padding: 0 8px;
height: 36px;
border: none;
border-radius: 2px;
background: #2196F3;
box-shadow: 0 0 4px rgba(0, 0, 0, .1),
0 4px 4px rgba(0, 0, 0, .1);
text-transform: uppercase;
font-size: 14px;
font-weight: 400;
color: #fff;
outline: none;
transition: all .2s;
}
button:hover {
box-shadow: 0 0 6px rgba(0, 0, 0, .2),
0 6px 6px rgba(0, 0, 0, .2);
}
button.flat {
background: none;
color: #fff;
box-shadow: none;
float: right;
}
button.flat:hover {
background-color: rgba(255, 255, 255, .2);
}
.popup-wrapper {
position: fixed;
left: 0;
top: 0;
display: table;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .3);
opacity: 1;
transition-property: opacity visibility transform;
transition-duration: .2s;
}
.popup-container {
display: table-cell;
text-align: center;
vertical-align: middle;
}
.popup-body {
display: inline-block;
width: 50%;
box-shadow: 0 0 8px rgba(0, 0, 0, .1),
0 8px 8px rgba(0, 0, 0, .1);
}
.hidden {
opacity: 0;
visibility: hidden;
transform: scale(2);
}
.blur {
filter: blur(1px);
filter: blur(1px);
}
$('.popup-wrapper').addClass('hidden');
$('.popup-wrapper').addClass('hidden');
$('button').click(function () {
$('.popup-wrapper').toggleClass('hidden');
$('main').toggleClass('blur');
});