-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
105 lines (93 loc) · 2.77 KB
/
index.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title><mar-quee> example!</title>
<style>
body {
font-family: sans-serif;
background-color: #2EAFAC;
font-size: 1.25rem;
}
pre {
background-color: black;
overflow: auto;
}
hr {
border: 3px dashed black;
border-radius: 4px;
}
footer {
text-align: center;
}
#marquee-holder {
display: block;
margin-left: auto;
margin-right: auto;
width: 90%;
font-size: 3rem;
}
:root {
--marquee-width: 350px;
--marquee-height: 3rem;
}
@media(min-width: 600px) {
body {
padding: 0 10%;
}
}
</style>
<link href="./prism/prism-tommorow-night.css" rel="stylesheet" />
<script src="./prism/prism.js" data-manual></script>
</head>
<body>
<h1>
<mar-quee> — Bringing back the most <strike>annoying</strike> amazing HTML element!
</h1>
<h2>
Live examples:
</h2>
<div id="marquee-holder">
Hello <mar-quee>marquee one</mar-quee> world
<mar-quee>marquee twoooooooooo</mar-quee>
<mar-quee>long boiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii</mar-quee>
</div>
<hr/>
<h2>
Usage:
</h2>
The code I used to on the page above is shown below:
<pre><code class="language-html">
<mar-quee>marquee one</mar-quee>
<mar-quee>marquee one</mar-quee>
<mar-quee>marquee twoooooooooo</mar-quee>
<mar-quee>long boiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii</mar-quee>
<!-- just before </body> -->
<script src="mar-quee.js"></script>
</code></pre>
& you can edit the CSS properties of the <code><mar-quee></code> elements using these CSS custom properties:
<pre><code class="language-css">
:root {
--marquee-width: 350px;
--marquee-height: 3rem;
}
</code></pre>
You can also set each of these properties, each shown with their default values below:
<pre><code class="language-css">
--marquee-animation-timing-function: linear;
--marquee-animation-duration: 3s;
--marquee-animation-iteration-count: infinite;
</code></pre>
<hr />
<footer>
<p>
Remix this project on Glitch! <span class="glitchButton"></span>
</p>
<p>
Checkout & contribute to <a href="https://github.com/cwervo/mar-quee">the project on GitHub!</a>
</p>
</footer>
<script src="https://button.glitch.me/button.js" style=" display: inline-block;"></script>
<script src="mar-quee.js"></script>
</body>
</html>