Add files via upload

This commit is contained in:
Sam 2023-03-31 03:25:50 +03:00 committed by GitHub
parent 8171acf0dd
commit 9d614dd2cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 89 additions and 0 deletions

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<button id="open">Click Here</button>
<div class="container" id="container">
<div class="modal">
<h1>Try Again</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Consequatur nam doloremque accusamus vel. Ea similique aliquid pariatur. Sint assumenda odit possimus voluptas odio</p>
<button id="close">Close</button>
</div>
</div>
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
<script src="main.js"></script>
</body>
</html>

View File

@ -0,0 +1,10 @@
const open = document.getElementById("open");
const container = document.getElementById("container");
const close = document.getElementById("close");
open.addEventListener('click', ()=> {
container.classList.add('show')
});
close.addEventListener('click', ()=> {
container.classList.remove('show')
});

View File

@ -0,0 +1,56 @@
body{
background: #edeef6;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
margin: 0;
}
button{
background: #DAA520;
color: #fff;
border: 1px solid #DAA520;
border-radius: 5px;
outline: none;
padding: 15px 25px;
cursor: pointer;
font-size: 16px;
transition: .3s;
}
button:hover{
background: #fff;
color: #DAA520;
}
.container{
display: flex;
align-items: center;
justify-content: center;
background-color:rgba(0,0,0, .3);
position: fixed;
opacity: 0;
pointer-events: none;
top:0;
left: 0;
height: 100vh;
width: 100%;
transition: .3s;
}
.container.show{
pointer-events: auto;
opacity: 1;
}
.modal{
background: #fff;
border-radius: 5px;
padding: 30px 50px;
width:500px;
max-width: 100%;
text-align: center;
}
.modal h1{
margin: 0;
}
.modal p{
font-size: 14px;
opacity: .7;
}