Advertisement
danine1

modal

Apr 24th, 2019
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.86 KB | None | 0 0
  1. /* The Modal (background) */
  2. .modal {
  3.   display: none; /* Hidden by default */
  4.   position: fixed; /* Stay in place */
  5.   z-index: 1; /* Sit on top */
  6.   left: 0;
  7.   top: 0;
  8.   width: 100%; /* Full width */
  9.   height: 100%; /* Full height */
  10.   overflow: auto; /* Enable scroll if needed */
  11.   background-color: rgb(0, 0, 0); /* Fallback color */
  12.   background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
  13. }
  14.  
  15. /* Modal Content/Box */
  16. .modal-content {
  17.   background-color: #fefefe;
  18.   margin: 15% auto; /* 15% from the top and centered */
  19.   padding: 20px;
  20.   border: 1px solid #888;
  21.   width: 80%; /* Could be more or less, depending on screen size */
  22. }
  23.  
  24. /* The Close Button */
  25. .close {
  26.   color: #aaa;
  27.   float: right;
  28.   font-size: 28px;
  29.   font-weight: bold;
  30. }
  31.  
  32. .close:hover,
  33. .close:focus {
  34.   color: black;
  35.   text-decoration: none;
  36.   cursor: pointer;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement