Created
June 13, 2019 22:17
-
-
Save ChrisLTD/3f16a9a0d6897aa436f00f5bc772a891 to your computer and use it in GitHub Desktop.
Simple Modal CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.modal, .modal-bg { | |
display: none; | |
} | |
.modal-active .modal-bg { | |
display: block; | |
background-color: rgba(0, 0, 0, 0.7); | |
position: fixed; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
z-index: 1000; | |
} | |
.modal-active .modal { | |
display: block; | |
position: fixed; | |
width: 100%; | |
max-width: 580px; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
z-index: 1001; | |
max-height: 100%; | |
overflow-y: auto; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment