Skip to content

Commit 50708dd

Browse files
authored
Add files via upload
1 parent 880d575 commit 50708dd

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Typewriter Effect</title>
5+
<link rel="stylesheet" type="text/css" href="style.css">
6+
</head>
7+
8+
<body>
9+
10+
<p>Pure Css Typewriter Effect.</p>
11+
12+
</body>
13+
</html>

style.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
body{
2+
background: #000;
3+
color: lime;
4+
}
5+
p{
6+
position: absolute;
7+
top: 50%;
8+
left: 50%;
9+
transform: translate(-50%,-50%);
10+
font-size: 24px;
11+
font-family: arial;
12+
letter-spacing: 2px;
13+
text-align: center;
14+
box-sizing: border-box;
15+
overflow: hidden;
16+
white-space: nowrap;
17+
border-right: 2px solid white;
18+
animation: typingEffect 4s steps(40) 500ms 1 normal,
19+
blinkEffect 500ms steps(40) infinite normal;
20+
}
21+
@keyframes typingEffect {
22+
from{
23+
width: 0;
24+
}
25+
to{
26+
width: 15em;
27+
}
28+
}
29+
@keyframes blinkEffect {
30+
from{
31+
border-right-color: white;
32+
}
33+
to{
34+
border-right-color: transparent;
35+
}
36+
}

0 commit comments

Comments
 (0)