-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
60 lines (53 loc) · 1.33 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes"
/>
<title>scroll-to-top demo</title>
<style>
scroll-to-top-wc::part(container) {
background: blue;
color: white;
border: 5px solid black;
}
:root {
--scroll-top-background-color: #bada55;
--scroll-top-color: red;
}
.container1 {
height: 50vh;
background: orange;
margin: 1rem;
}
.container2 {
height: 50vh;
background: mediumpurple;
margin: 1rem;
}
.container3 {
height: 50vh;
background: #bada55;
margin: 1rem;
}
.container4 {
height: 50vh;
background: mediumvioletred;
margin: 1rem;
}
</style>
<script type="module" src="./index.js"></script>
</head>
<body>
<div class="vertical-section-container centered">
<h3 id="MainHeading">Basic scroll-to-top demo</h3>
<div class="container1"></div>
<div class="container2"></div>
<div class="container3"></div>
<div class="container4"></div>
<scroll-to-top-wc fancy id="ScrollToTopWC" activateWhen="500"></scroll-to-top-wc>
</div>
</body>
</html>