forked from SnippetsDevelop/snippetsdevelop.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTypewritter-effect.html
66 lines (66 loc) · 1.52 KB
/
Typewritter-effect.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Typewritter Effect</title>
<!--Google Fonts-->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Cutive+Mono&display=swap"
rel="stylesheet"
/>
<style>
body {
width: 100%;
height: 100vh;
margin: 0;
padding: 0;
background: black;
display: flex;
align-items: center;
justify-content: center;
}
.type {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.type span {
font-size: 60px;
color: white;
font-family: "Cutive Mono";
height: 60px;
border-right: 1mm solid white;
letter-spacing: 5px;
animation: typing 3.5s steps(13, end), blink 1s step-end infinite;
overflow: hidden;
white-space: nowrap;
}
@keyframes typing {
from {
width: 0;
}
to {
width: 100%;
}
}
@keyframes blink {
0%,
100% {
border-color: transparent;
}
50% {
border-color: white;
}
}
</style>
</head>
<body>
<div class="type">
<span>Typing Effect</span>
</div>
</body>
</html>