-
Notifications
You must be signed in to change notification settings - Fork 0
/
marquee.css
60 lines (50 loc) · 1.16 KB
/
marquee.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* code stolen shamelessly from indian w3schools */
/* modified by me to make it more annoying :3 */
/* Container styles */
.scrolling-text-container {
background-color: #990000;
overflow: hidden;
}
/* Inner container styles */
.scrolling-text-inner {
display: flex;
white-space: nowrap;
font-family: 'Times New Roman', Times, serif;
color: #ffff00;
font-size: 40pt;
font-weight: 600;
padding: 8px 0;
}
/* Text styles */
.scrolling-text {
display: flex;
}
.scrolling-text-item {
padding: 0 30px;
}
/* Apply the animation to the text items */
.scrolling-text-inner>div {
animation: var(--direction) var(--marquee-speed) linear infinite;
}
/* fuck you no pausing */
/* Pause the animation when a user hovers over it */
/* .scrolling-text-container:hover .scrolling-text-inner>div {
animation-play-state: paused;
} */
/* Setting the Animation using Keyframes */
@keyframes scroll-left {
0% {
transform: translateX(0%);
}
100% {
transform: translateX(-100%);
}
}
@keyframes scroll-right {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(0%);
}
}