Skip to content

Commit 014842c

Browse files
Add stephenjamesada's typewriter effect (#2966)
* Add stephenjamesada's typewriter effect * Moved contribution folder to Art
1 parent 18b99bd commit 014842c

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Typewriter Animation</title>
6+
<link rel="stylesheet" href="styles.css">
7+
</head>
8+
<body>
9+
<div class="typewriter-container">
10+
<h1 class="typewriter">Hi, this is my typewriter animation!</h1>
11+
</div>
12+
</body>
13+
</html>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"artName": "typewriter effect",
3+
"githubHandle": "stephenjamesada"
4+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
body {
2+
background: #fff;
3+
color: #000;
4+
margin: 0;
5+
padding: 0;
6+
font-family: monospace;
7+
height: 100vh;
8+
display: flex;
9+
align-items: center;
10+
justify-content: center;
11+
}
12+
13+
.typewriter-container {
14+
border-right: 4px solid #a9a9a9;
15+
white-space: nowrap;
16+
overflow: hidden;
17+
width: 0;
18+
animation:
19+
typing 3s steps(30, end) forwards,
20+
blink 0.75s step-end infinite;
21+
}
22+
23+
@keyframes typing {
24+
from {
25+
width: 0;
26+
}
27+
to {
28+
width: 72ch;
29+
}
30+
}
31+
32+
@keyframes blink {
33+
50% {
34+
border-color: transparent;
35+
}
36+
}

0 commit comments

Comments
 (0)