-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
110 lines (98 loc) · 2.14 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
106
107
108
109
110
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Scroll Snapper Demos</title>
</head>
<body>
<header class="wrap container">
<h1>Scroll Snapper Demos</h1>
</header>
<div class="wrap container">
<h2>Basic</h2>
<div data-snap-slider>
<div>1</div>
<div>2</div>
<div>3</div>
<div style="width: 20rem">4</div>
<div>5</div>
</div>
</div>
<div class="wrap container">
<h2>Gap</h2>
<div data-snap-slider class="intrinsic-items" style="--gap: 1rem">
<div><img src="https://picsum.photos/420/280" /></div>
<div><img src="https://picsum.photos/400/350" /></div>
<div><img src="https://picsum.photos/350/350" /></div>
<div><img src="https://picsum.photos/900/500" /></div>
<div><img src="https://picsum.photos/400/300" /></div>
</div>
</div>
<div class="wrap container">
<h2>Peek width, no scroll padding</h2>
<div
class="peeker-peek-width"
data-snap-slider
style="
--elements: 1;
--scroll-by: 1;
--gap: 1rem;
--padding-inline: 0;
--scroll-snap-align: center;
--peek-width: 4rem;
"
>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
</div>
</div>
<div class="wrap container">
<h2>scroll padding only peeker</h2>
<div
class="peeker-scroll-padding"
data-snap-slider
style="
--elements: 1;
--scroll-by: 1;
--gap: 1rem;
--padding-inline: 1.75rem;
"
>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
</div>
</div>
<div class="demo-holy-grail">
<div class="wrap container">
<h2>Holy Grail Demo Only Vars</h2>
</div>
<div data-snap-slider>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
<div>9</div>
<div>10</div>
<div>11</div>
<div>12</div>
</div>
</div>
<footer>
<div class="wrap container">
<p>The end.</p>
</div>
</footer>
<script type="module" src="src/main.ts"></script>
</body>
</html>