Skip to content

Commit 52ffa21

Browse files
Merge pull request #20 from hack-rpi/Aaryan-RCOSLearning
Tiktok Animation
2 parents 8a8b57b + edb8a8b commit 52ffa21

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed

AaryanFolder/TikTok/index.html

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
5+
<title>Tick Tock Animation</title>
6+
<!-- Google Fonts -->
7+
<link
8+
href="https://fonts.googleapis.com/css2?family=Poppins:wght@800&display=swap"
9+
rel="stylesheet"
10+
/>
11+
<!-- Stylesheet -->
12+
<link rel="stylesheet" href="style.css" />
13+
</head>
14+
<body>
15+
<div class="container">
16+
<div class="word word-1">
17+
<span>T</span>
18+
<span>CK</span>
19+
</div>
20+
<div class="pendulum"></div>
21+
<div class="word word-2">
22+
<span>T</span>
23+
<span>CK</span>
24+
</div>
25+
</div>
26+
</body>
27+
</html>

AaryanFolder/TikTok/style.css

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
* {
2+
padding: 0;
3+
margin: 0;
4+
box-sizing: border-box;
5+
}
6+
body {
7+
height: 100vh;
8+
background: linear-gradient(45deg, #4756c6, #ae76f1, #e9b6ed);
9+
}
10+
.container {
11+
font-size: 14px;
12+
width: 35em;
13+
height: 31.25em;
14+
position: relative;
15+
margin: auto;
16+
}
17+
.word {
18+
font-family: "Poppins", sans-serif;
19+
color: #301167;
20+
font-weight: 800;
21+
font-size: 6em;
22+
letter-spacing: 0.3em;
23+
position: absolute;
24+
}
25+
.word-1 {
26+
left: 0.52em;
27+
top: 1em;
28+
}
29+
.word-2 {
30+
top: 3.12em;
31+
right: 0;
32+
}
33+
.word-2 span:last-child {
34+
margin-left: 0.3em;
35+
}
36+
.pendulum {
37+
background-color: #f5de59;
38+
height: 25em;
39+
width: 1.3em;
40+
position: absolute;
41+
left: 11.9em;
42+
top: -2.5em;
43+
box-shadow: 0 0 1.8em rgba(0, 8, 57, 0.2);
44+
transform: rotate(15deg);
45+
transform-origin: top;
46+
animation: swing 2.5s infinite ease-in-out;
47+
}
48+
@keyframes swing {
49+
50% {
50+
transform: rotate(-15deg);
51+
}
52+
}
53+
.pendulum:after {
54+
position: absolute;
55+
content: "";
56+
height: 2.5em;
57+
width: 2.5em;
58+
border: 1.3em solid #f5de59;
59+
border-radius: 50%;
60+
bottom: -4.37em;
61+
left: -2.1em;
62+
}
63+
@media screen and (min-width: 700px) {
64+
.container {
65+
font-size: 20px;
66+
}
67+
}

0 commit comments

Comments
 (0)