Created
October 6, 2020 01:29
-
-
Save desoga10/2b37a45460e5788eb46452fd4af2d875 to your computer and use it in GitHub Desktop.
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
.btn{ | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
background: pink; | |
font-size: 20px; | |
color: white; | |
padding: 10px 30px; | |
cursor: pointer; | |
} | |
.modal { | |
position: fixed; | |
left: 0; | |
top: 0; | |
width: 100%; | |
height: 100%; | |
background-color: rgba(0, 0, 0, 0.3); | |
opacity: 0; | |
visibility: hidden; | |
} | |
.modal-box { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
background-color: pink; | |
padding: 1rem 1.5rem; | |
width: 24rem; | |
border-radius: 0.5rem; | |
} | |
.close-button { | |
float: right; | |
width: 1.5rem; | |
line-height: 1.5rem; | |
text-align: center; | |
cursor: pointer; | |
border-radius: 0.25rem; | |
background-color: lightgray; | |
} | |
.show-modal { | |
opacity: 1; | |
visibility: visible; | |
transform: scale(1.0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment