Add files via upload
This commit is contained in:
parent
dc44f1b45d
commit
61a743562e
11
100_projects/9-javaScript-auto-write-text/index.html
Normal file
11
100_projects/9-javaScript-auto-write-text/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Auto Write Text</title>
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<script src="script.js" defer></script>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
11
100_projects/9-javaScript-auto-write-text/script.js
Normal file
11
100_projects/9-javaScript-auto-write-text/script.js
Normal file
@ -0,0 +1,11 @@
|
||||
const text = "She Is My Queen I Love Her Eyes So Much 🤍 ";
|
||||
let index = 0;
|
||||
|
||||
function writeText() {
|
||||
document.body.innerText = text.slice(0, index);
|
||||
index++;
|
||||
if (index > text.length) {
|
||||
index = 0;
|
||||
}
|
||||
}
|
||||
setInterval(writeText, 100);
|
13
100_projects/9-javaScript-auto-write-text/style.css
Normal file
13
100_projects/9-javaScript-auto-write-text/style.css
Normal file
@ -0,0 +1,13 @@
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
background-color: #FFB6C1;
|
||||
color: white;
|
||||
font-size: 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
}
|
Loading…
Reference in New Issue
Block a user