"modal"
Bootstrap 3.0.0 Snippet by evarevirus

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html><html class=''> <head><script src='//production-assets.codepen.io/assets/editor/live/console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/events_runner-73716630c22bbc8cff4bd0f07b135f00a0bdc5d14629260c3ec49e5606f98fdd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/css_live_reload_init-2c0dc5167d60a5af3ee189d570b1835129687ea2a61bee3513dee3a50c115a77.js'></script><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="shortcut icon" type="image/x-icon" href="//production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" /><link rel="mask-icon" type="" href="//production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" /><link rel="canonical" href="https://codepen.io/wintr/pen/LZWaWE?depth=everything&order=popularity&page=53&q=box&show_forks=false" /> <style class="cp-pen-styles">@import "https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600"; *, *::before, *::after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } html, body { height: 100%; width: 100%; } a { color: #FFF; text-decoration: none; } a:hover { text-decoration: none; } body { padding: 0px; margin: 0; font-family: "Source Sans Pro", sans-serif; background: #644cad; background: -moz-linear-gradient(left, #644cad 0%, #4426a8 100%); background: -webkit-linear-gradient(left, #644cad 0%, #4426a8 100%); background: linear-gradient(to right, #644cad 0%, #4426a8 100%); -webkit-font-smoothing: antialiased; } h2 { margin-top: 0px; color: #4d5c6e; font-weight: 400; } p { color: #72879e; font-size: 16px; line-height: 24px; } .blur { -webkit-filter: blur(5px); -moz-filter: blur(5px); -o-filter: blur(5px); -ms-filter: blur(5px); filter: blur(5px); } .flex { min-height: 100vh; display: flex; align-items: center; justify-content: center; } .modalcontainer { display: none; position: absolute; top: 0; bottom: 0; left: 0; right: 0; background-color: rgba(0, 0, 0, 0.5); } .modalcontainer.active { display: block; } .modal { display: none; position: relative; width: 600px; height: 330px; background-color: #FFF; } .modal.active { display: block; } .modal .content { padding: 30px; } .modal .close { font-family: "Source Sans Pro", sans-serif; cursor: pointer; color: #FFF; width: 50px; height: 50px; text-align: center; line-height: 50px; position: absolute; right: 0; color: #999; font-size: 40px; } .modal .close span { transform: rotate(45deg); display: block; } .modal .buttons { width: 600px; position: absolute; bottom: 0; height: 50px; background-color: #FFF; } .modal .buttons a { width: 50%; height: 50px; line-height: 50px; text-align: center; float: left; background-color: #EEE; color: #4d5c6e; transition: 0.3s; text-transform: uppercase; font-weight: bold; } .modal .buttons a:hover { background-color: #e1e1e1; } .modal .buttons a:nth-of-type(2) { float: right; color: #FFF; background-color: #00c06d; } .modal .buttons a:nth-of-type(2):hover { background-color: #00a75f; } .modalbttn { background-color: #24252A; padding: 12px 25px; text-transform: uppercase; border-top: 1px solid rgba(255, 255, 255, 0.2); border-bottom: 1px solid rgba(0, 0, 0, 0.2); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); border-radius: 4px; } .modalbttn:hover { background-color: #2b2c32; } </style></head><body> <div class="flex"> <div class="modalcontainer"> <div class="flex"> <div class="modal"> <div class="close"><span>+</span></div> <div class="content"> <h2>Modal title</h2> <p>Let's go up in here, and start having some fun The very fact that you're aware of suffering is enough reason to be overjoyed that you're alive and can experience it. It's a super day, so why not make a beautiful sky?</p> </div> <div class="buttons"> <a href="#0">Cancel</a> <a href="#0">Accept</a> </div> </div> </div> </div> <a href="#0" class="modalbttn">Open Modal</a> </div> <script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script><script src='https://code.jquery.com/jquery-2.2.4.min.js'></script> <script >$(".modalbttn").click(function() { $(".modalcontainer").fadeIn("slow"); $(".modal").fadeIn("slow"); }); $(".close").click(function() { $(".modalcontainer").fadeOut("slow"); $(".modal").fadeOut("slow"); }); $(".buttons").click(function() { $(".modalcontainer").fadeOut("slow"); $(".modal").fadeOut("slow"); }); //# sourceURL=pen.js </script> </body></html>

Related: See More


Questions / Comments: