Add files via upload

This commit is contained in:
Sam 2023-04-28 13:17:48 +03:00 committed by GitHub
parent df81028205
commit d855c245a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,41 @@
*{
box-sizing: border-box;
margin: 0;
padding: 0;
}
body{
font-size: 18px;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
flex-direction: column;
height: 100vh;
background: #E9BF8B;
}
#button{
text-transform: uppercase;
font-size: 18px;
padding: 10px 15px;
color: #2C2D2A;
background: transparent;
border: 1px solid #2C2D2A;
border-radius: 3px;
transition: .2s;
cursor:pointer;
}
#button:hover{
background:#2C2D2A;
color: #E9BF8B;
box-shadow: 1px 1px 1px #2C2D2A;
}
#type{
color: #2C2D2A;
font-size: 24px;
margin-top: 20px;
transition: .2s;
}
#type:hover{
background: #2C2D2A;
color: #E9BF8B;
}

View File

@ -0,0 +1,16 @@
<!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="css.css">
</head>
<body>
<button id="button">Start write</button>
<p id="type"></p>
<script src="main.js"></script>
</body>
</html>

View File

@ -0,0 +1,15 @@
let myText = 'Hello Everyone My Name Is Essam, I Love Programming',
i = 0,
myButton = document.getElementById('button');
myButton.onclick = function(){
'use strict';
const typeWriter = setInterval(function(){
document.getElementById('type').textContent += myText[i];
i = i + 1;
if (i > myText.length - 1) {
clearInterval(typeWriter);
}
},200);
};