Skip to content

Commit 628f13e

Browse files
committed
adding a rotating text animation
a HTML and CSS rotating text animation
1 parent 4359b93 commit 628f13e

File tree

4 files changed

+96
-0
lines changed

4 files changed

+96
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ Please be aware that the demos may exhibit significant accessibility issues, suc
9797
- [Ripple Effect](#ripple-effect)
9898
- [Redar Loader](#Redar-Loader)
9999
- [Resizable Split Panel](#resizable-split-panel)
100+
- [Rotating Text](#rotating-text)
100101
- [Scary Animation](#scary-animation)
101102
- [Scenery](#scenery)
102103
- [Scroll Video Cinematic Animation](#scroll-video-cinematic)
@@ -1252,6 +1253,12 @@ An interactive resume built entirely using **HTML and CSS** — featuring animat
12521253

12531254
---
12541255

1256+
## <a id="rotating-text"></a>Rotating Text
1257+
1258+
[<img src="images/rotating_text.mp4" height="230" title="Demo">]()
1259+
1260+
**[⬆ back to top](#quick-links)**
1261+
12551262
## Contributors
12561263

12571264
Thanks to these wonderful people who have contributed to this project!

Rotating-Text-Animation/index.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Rotating Text Animation</title>
8+
9+
<link rel="stylesheet" href="style.css">
10+
</head>
11+
12+
<body>
13+
<div class="card">
14+
<div class="loader">
15+
<p>Coding</p>
16+
<div class="words">
17+
<span class="word">HTML</span>
18+
<span class="word">CSS</span>
19+
<span class="word">JS</span>
20+
<span class="word">Java</span>
21+
<span class="word">Python</span>
22+
</div>
23+
</div>
24+
</div>
25+
26+
</body>
27+
28+
</html>

Rotating-Text-Animation/style.css

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
:root {
2+
--bg-color: #fff;
3+
--text-color: #111;
4+
--highlight-color: pink;
5+
--font-family: "Poppins", sans-serif;
6+
}
7+
8+
body {
9+
margin: 0;
10+
height: 100vh;
11+
display: flex;
12+
align-items: center;
13+
justify-content: center;
14+
background-color: var(--bg-color);
15+
font-family: var(--font-family);
16+
}
17+
18+
19+
.card {
20+
background-color: var(--bg-color);
21+
border: 2px solid var(--highlight-color);
22+
padding: 1rem 2rem;
23+
border-radius: 1.25rem;
24+
}
25+
26+
.loader {
27+
display: flex;
28+
align-items: baseline;
29+
font-size: 25px;
30+
font-weight: 500;
31+
}
32+
33+
.loader p {
34+
color: var(--text-color);
35+
margin: 0;
36+
}
37+
38+
.words {
39+
overflow: hidden;
40+
position: relative;
41+
height: 1.2em;
42+
margin-left: 0.5rem;
43+
}
44+
45+
.words::after {
46+
display: none;
47+
}
48+
49+
.word {
50+
display: block;
51+
color: var(--highlight-color);
52+
animation: spin 5s infinite;
53+
}
54+
55+
@keyframes spin {
56+
0%, 20% { transform: translateY(0); }
57+
25%, 40% { transform: translateY(-100%); }
58+
45%, 60% { transform: translateY(-200%); }
59+
65%, 80% { transform: translateY(-300%); }
60+
85%, 100% { transform: translateY(-400%); }
61+
}

images/rotating_text.mp4

177 KB
Binary file not shown.

0 commit comments

Comments
 (0)