<div class="overlay">
<div class="popup">
<h2>Do you like money?</h2>
<p>Send us your credit card details to get free money.</p>
<button>Sounds fishy.</button>
<button>Yes, I love money!</button>
</div>
</div>
* {
box-sizing: border-box;
}
body, html {
height: 100%;
overflow: hidden;
}
* {
box-sizing: border-box;
}
body, html {
height: 100%;
overflow: hidden;
}
.overlay {
height: 100%;
width: 100%;
background: rgba(0, 0, 0, 0.4);
display: flex;
justify-content: center;
align-items: center;
}
.popup {
border-radius: 8px;
border: 1px solid grey;
padding: 2rem;
background-color: rgba(255, 255, 255, 1);
min-width: 240px;
max-width: 80%;
box-shadow:
0 7px 8px -4px rgba(0,0, 0, 0.2),
0 13px 19px 2px rgba(0, 0, 0, 0.14),
0 5px 24px 4px rgba(0, 0, 0, 0.12);
}
button {
border-width: 0;
border-radius: 4px;
background-color: rgba(225, 225, 225, 1);
padding: 1rem;
color: rgba(95, 95, 95, 1);
box-shadow:
0 1px 3px 0 rgba(0,0,0,.2),
0 1px 1px 0 rgba(0,0,0,.14),
0 2px 1px -1px rgba(0,0,0,.12);
cursor: pointer;
font-weight: 700;
margin-top: 1rem;
margin-right: 0.75rem;
}
button:hover {
background-color: rgb(198,200,201);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.