Created
February 22, 2022 17:24
-
-
Save kilomeow/40e5855a47b5e3a776124ba203bc9897 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
<div id="adult-confirm"> | |
<div class="blackout"></div> | |
<div class="popup"> | |
<p>Нажимая на кнопку я подтверждаю что достиг_ла совершеннолетнего возраста</p> | |
<button onclick="adultConfirm()">Подтверждаю</button> | |
</div> | |
</div> | |
<script> | |
const adultConfirm = () => document.getElementById('adult-confirm').style.display = 'none' | |
</script> | |
<style> | |
#adult-confirm .blackout { | |
position: absolute; | |
left: 0; | |
top: 0; | |
margin: 0; | |
width: 100%; | |
height: 100%; | |
background-color: black; | |
opacity: 0.5; | |
pointer-events: none; | |
z-index: 100; | |
} | |
#adult-confirm .popup { | |
position: absolute; | |
left: 50%; | |
top: 50%; | |
transform: translate(-50%, -50%); | |
max-width: 30em; | |
background-color: white; | |
border-radius: 0.5em; | |
z-index: 101; | |
} | |
#adult-confirm .popup > p { | |
font-weight: 500; | |
margin: 1em; | |
margin-bottom: 0; | |
} | |
#adult-confirm .popup > button { | |
float: right; | |
margin: 1em; | |
border: none; | |
border-radius: 0.25em; | |
color: white; | |
background-color: black; | |
font-size: 1em; | |
padding: 0.5em; | |
cursor: pointer; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment