Skip to content

Commit a3014a2

Browse files
authored
Merge pull request #5 from isaacpitwa/text-animations
Text animations
2 parents c87e2e9 + b3917e7 commit a3014a2

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

applications/spacious/index.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Spacious Animation</title>
7+
<link rel="stylesheet" href="./styles.css"/>
8+
</head>
9+
<body>
10+
<div class="main">
11+
<span>S</span>
12+
<span>P</span>
13+
<span>A</span>
14+
<span>C</span>
15+
<span>I</span>
16+
<span class="letter"></span>
17+
<span>U</span>
18+
<span>S</span>
19+
</div>
20+
</body>
21+
</html>

applications/spacious/styles.css

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
*{
2+
padding: 0;
3+
margin: 0;
4+
box-sizing: border-box;
5+
}
6+
body{
7+
width: 100%;
8+
height: 100vh;
9+
display: flex;
10+
justify-content: center;
11+
align-items: center;
12+
font-family: 'Quicksand', sans-serif;
13+
font-size: 42px;
14+
background: #f7f7f7;
15+
}
16+
span{
17+
margin: 0 15px;
18+
line-height: .7;
19+
text-shadow: 0 0 2px rgba(0, 0, 0, .45);
20+
animation: span 3s ease-in infinite alternate;
21+
}
22+
.main{
23+
display: flex;
24+
justify-content: center;
25+
align-items: flex-start;
26+
}
27+
.letter{
28+
display: inline-flex;
29+
height: 30px;
30+
width: 27px;
31+
/* border: 2.5px solid #FF1EAD; */
32+
border: 2.35px solid black;
33+
border-radius: 14px;
34+
box-shadow:
35+
0 0 2px rgba(0, 0, 0, .75),
36+
inset 0 0 2px rgba(0, 0, 0, .45);
37+
38+
animation: letter 3s ease-in-out infinite alternate;
39+
}
40+
@keyframes span {
41+
0%,30%{ margin: 0 15px; }
42+
70%,100%{ margin: 0 5px; }
43+
}
44+
@keyframes letter {
45+
0%,30%{ width: 27px; }
46+
70%,100%{ width: 30vw; }
47+
}

0 commit comments

Comments
 (0)