"modal css"
Bootstrap 3.3.0 Snippet by evarevirus

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.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 ----------> <input type="checkbox" id="modal" /> <p class="blurp">Do it. Click the Button. I dare you.</p> <label for="modal" class="modal-btn"> <i class="fa fa-fire" aria-hidden="true"></i> </label> <!-- <div class="modal-bg"></div> --> <label for="modal" class="modal-bg"></label> <div class="modal-content"> <label for="modal" class="close"> <i class="fa fa-times" aria-hidden="true"></i> </label> <header> <h2>So This is a Modal</h3> </header> <article class="content"> <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.</p> </article> <footer> <a href="http://geekstudios.co" target="_parent" class="button success">Accept</a> <label for="modal" class="button danger">Decline</label> </footer> </div>
html { box-sizing: border-box; } *, *::after, *::before { box-sizing: inherit; } *, *:before, *:after { box-sizing: border-box; outline: none; } body { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100vh; background-color: whitesmoke; font-family: 'Source Sans Pro', sans-serif; font-size: 16px; font-smooth: auto; font-weight: 300; line-height: 1.5; color: #444; background-image: url("http://dakotarumors.com/assets/img/header-bg.jpg"); background-position: center center; background-size: cover; } body:before { position: absolute; content: ''; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.7); z-index: -1; } p { font-weight: 400; } a { text-decoration: none; } label { cursor: pointer; } .modal-btn { position: relative; display: table-cell; width: 100px; height: 100px; background-color: #2c3e50; box-shadow: 0 0 40px rgba(0, 0, 0, 0.3); border-radius: 50%; font-size: 36px; color: white; text-align: center; line-height: 2.75; transition: box-shadow 250ms ease; } .modal-btn:hover { box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); } .modal-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; z-index: 10; visibility: hidden; transition: background-color 250ms linear; } .modal-content { position: absolute; top: 50%; left: 50%; width: 50%; height: auto; margin-top: -18%; margin-left: -25%; padding: 30px; background-color: white; border-radius: 4px; box-shadow: 0 0 50px rgba(0, 0, 0, 0.5); transform: scale(0); transition: transform 250ms ease; visibility: hidden; z-index: 20; } .modal-content .close { position: relative; float: right; font-size: 18px; transition: transform 500ms ease; z-index: 11; } .modal-content .close:hover { color: #3498db; transform: rotate(540deg); } .modal-content header { position: relative; display: block; border-bottom: 1px solid #eee; } .modal-content header h2 { margin: 0 0 10px; padding: 0; font-size: 28px; } .modal-content article { position: relative; display: block; margin: 0; padding: 0; font-size: 16px; line-height: 1.75; } .modal-content footer { position: relative; display: flex; align-items: center; justify-content: flex-end; width: 100%; margin: 0; padding: 10px 0 0; } .modal-content footer .button { position: relative; padding: 10px 30px; border-radius: 3px; font-size: 14px; font-weight: 400; color: white; text-transform: uppercase; overflow: hidden; } .modal-content footer .button:before { position: absolute; content: ''; top: 0; left: 0; width: 0; height: 100%; background-color: rgba(255, 255, 255, 0.2); transition: width 250ms ease; z-index: 0; } .modal-content footer .button:hover:before { width: 100%; } .modal-content footer .button.success { margin-right: 5px; background-color: #2ecc71; } .modal-content footer .button.danger { background-color: #e74c3c; } #modal { display: none; } #modal:checked ~ .modal-bg { visibility: visible; background-color: black; opacity: 0.7; transition: background-color 250ms linear; } #modal:checked ~ .modal-content { visibility: visible; transform: scale(1); transition: transform 250ms ease; z-index: 111; }

Related: See More


Questions / Comments: