Skip to content

Commit 8c14a40

Browse files
authored
Merge pull request #4 from MamataAgrawal/contribution
Added New Project: CSS Typewriter
2 parents bee5ecf + 24f97ce commit 8c14a40

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

CREDITS.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
<li>CSS Fancy Buttons: Brad Hussey</li>
55
<li>Vampire: Alvaro Montoro</li>
66
<li>Reptillian Eye: Josetxu</li>
7+
<li>CSS Typewriter: Marko</li>
78
</ol>

CSS Typewriter/index.html

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<link rel="stylesheet" href="styles.css" />
2+
<div class="wrapper">
3+
<div class="typing-demo">
4+
This is a typing demo.
5+
</div>
6+
</div>

CSS Typewriter/styles.css

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.wrapper {
2+
height: 100vh;
3+
/*This part is important for centering*/
4+
display: grid;
5+
place-items: center;
6+
}
7+
8+
.typing-demo {
9+
width: 22ch;
10+
animation: typing 2s steps(22), blink .5s step-end infinite alternate;
11+
white-space: nowrap;
12+
overflow: hidden;
13+
border-right: 3px solid;
14+
font-family: monospace;
15+
font-size: 2em;
16+
}
17+
18+
@keyframes typing {
19+
from {
20+
width: 0
21+
}
22+
}
23+
24+
@keyframes blink {
25+
50% {
26+
border-color: transparent
27+
}
28+
}

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
<li>CSS 3 Fancy Buttons</li>
66
<li>Vampire with CSS</li>
77
<li>Reptillian Eye</li>
8+
<li>CSS Typewriter</li>
89
</ol>

0 commit comments

Comments
 (0)