-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathticker.html
50 lines (48 loc) · 1.39 KB
/
ticker.html
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
<!DOCTYPE html>
<html>
<head>
<style>
.marquee {
--gap: 1rem;
position: relative;
display: flex;
overflow: hidden;
user-select: none;
gap: var(--gap);
}
.marquee-content {
flex-shrink: 0;
display: flex;
justify-content: space-around;
gap: var(--gap);
min-width: 100%;
}
@keyframes scroll {
from {
transform: translateX(0);
}
to {
transform: translateX(calc(-100% - var(--gap)));
}
}
.anim-scroll {
animation: scroll 10s linear infinite;
}
</style>
</head>
<body>
<div class="marquee">
<span class="marquee-content anim-scroll"></span>
<span aria-hidden="true" class="marquee-content anim-scroll"></span>
</div>
</body>
<footer>
<script>
const urlParams = new URLSearchParams(window.location.search);
const text = urlParams.get('text');
for(var content of document.getElementsByClassName('marquee-content')){
content.innerText = text;
}
</script>
</footer>
</html>