Advertisement
valdeir2000

StackOverflow 266484

Jan 2nd, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 3.16 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3.     <head>
  4.         <meta charset="utf-8">
  5.         <title>Documento sem título</title>
  6.         <link rel="stylesheet" type="text/css" href="css/normalize.css" />
  7.         <link rel="stylesheet" type="text/css" media="screen" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
  8.         <link rel="stylesheet" type="text/css" media="screen" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"/>
  9.         <link rel="stylesheet" type="text/css" href="css/css.css" />
  10.         <style>
  11.             @import url(https://fonts.googleapis.com/css?family=Montserrat:400,700);
  12.             html, body {
  13.             width: 100%;
  14.             height: 100%;
  15.             margin: 0;
  16.             }
  17.             .page-wrapper {
  18.             width: 100%;
  19.             height: 100%;
  20.             background: url() center no-repeat;
  21.             background-size: cover;
  22.             }
  23.             .blur-it {
  24.             filter: blur(4px);
  25.             }
  26.             a.btn {
  27.             width: 200px;
  28.             padding: 18px 0;
  29.             position: absolute;
  30.             top: 50%;
  31.             left: 50%;
  32.             transform: translate(-50%, -50%);
  33.             font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  34.             font-weight: 700;
  35.             text-align: center;
  36.             text-decoration: none;
  37.             text-transform: uppercase;
  38.             color: #fff;
  39.             border-radius: 0;
  40.             background: #e2525c;
  41.             }
  42.             .modal-wrapper {
  43.             width: 100%;
  44.             height: 100%;
  45.             position: fixed;
  46.             top: 0;
  47.             left: 0;
  48.             background: rgba(41, 171, 164, 0.8);
  49.             visibility: hidden;
  50.             opacity: 0;
  51.             transition: all 0.25s ease-in-out;
  52.             }
  53.             .modal-wrapper.open {
  54.             opacity: 1;
  55.             visibility: visible;
  56.             }
  57.             .modal {
  58.             width: 600px;
  59.             height: 400px;
  60.             display: block;
  61.             margin: 50% 0 0 -300px;
  62.             position: relative;
  63.             top: 50%;
  64.             left: 50%;
  65.             background: #fff;
  66.             opacity: 0;
  67.             transition: all 0.5s ease-in-out;
  68.             }
  69.             .modal-wrapper.open .modal {
  70.             margin-top: -200px;
  71.             opacity: 1;
  72.             }
  73.             .head {
  74.             width: 90%;
  75.             height: 32px;
  76.             padding: 12px 30px;
  77.             overflow: hidden;
  78.             background: #e2525c;
  79.             }
  80.             .btn-close {
  81.             font-size: 28px;
  82.             display: block;
  83.             float: right;
  84.             color: #fff;
  85.             }
  86.             .content {
  87.             padding: 10%;
  88.             }
  89.             .good-job {
  90.             text-align: center;
  91.             font-family: 'Montserrat', Arial,       Helvetica, sans-serif;
  92.             color: #e2525c;
  93.             }
  94.             .good-job .fa-thumbs-o-up {
  95.             font-size: 60px;
  96.             }
  97.             .good-job h1 {
  98.             font-size: 45px;
  99.             }
  100.         </style>
  101.     </head>
  102.     <body>
  103.         <!-- Button -->
  104.         <div class="page-wrapper">
  105.             <a class="btn trigger" href="#">click me</a>
  106.         </div>
  107.         <!-- Modal -->
  108.         <div class="modal-wrapper">
  109.             <div class="modal">
  110.                 <div class="head">
  111.                     <a class="btn-close trigger" href="#">
  112.                     <i class="fa fa-times" aria-hidden="true"></i>
  113.                     </a>
  114.                 </div>
  115.                 <div class="content">
  116.                     <div class="good-job">
  117.                         <i class="fa fa-thumbs-o-up" aria-hidden="true"></i>
  118.                         <h1>Good Job!</h1>
  119.                     </div>
  120.                 </div>
  121.             </div>
  122.         </div>
  123.         <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  124.         <script>
  125.             $( document ).ready(function() {
  126.              $('.trigger').on('click', function() {
  127.                 $('.modal-wrapper').toggleClass('open');
  128.                $('.page-wrapper').toggleClass('blur-it');
  129.                 return false;
  130.              });
  131.             });
  132.         </script>
  133.     </body>
  134. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement