-
Notifications
You must be signed in to change notification settings - Fork 0
/
headline-auto-scroll.html
54 lines (49 loc) · 1.21 KB
/
headline-auto-scroll.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
51
52
53
54
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>News Ticker</title>
</head>
<body>
<div class="news-ticker">
<div class="news-container">
<div class="news-item">Breaking News: Lorem ipsum dolor sit amet.</div>
<div class="news-item">New Study: Consectetur adipiscing elit.</div>
<div class="news-item">
Weather Update: Sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua.
</div>
<!-- Add more news items as needed -->
</div>
</div>
</body>
<style>
body {
margin: 0;
font-family: Arial, sans-serif;
}
.news-ticker {
background-color: #333;
color: white;
overflow: hidden;
padding: 10px 0;
}
.news-container {
display: flex;
animation: scroll 15s linear infinite; /* Adjust the animation duration as needed */
}
.news-item {
margin-right: 30px;
white-space: nowrap;
}
@keyframes scroll {
0% {
transform: translateX(100%);
}
100% {
transform: translateX(-100%);
}
}
</style>
</html>