-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.html
More file actions
160 lines (129 loc) · 3.01 KB
/
Copy pathbase.html
File metadata and controls
160 lines (129 loc) · 3.01 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Slider BASE</title>
<style>
:where([data-storepress-slider]) {
display: flex;
flex-direction: column;
position: relative;
/*for horizontal*/
/*height: fit-content;*/
--slides-to-show: 1;
--is-horizontal: true;
}
:where([data-storepress-slider]) .controls {
display: flex;
flex-direction: column;
}
:where([data-storepress-slider]) .controls > .pagination {
display: flex;
flex-direction: row;
justify-content: center;
gap: 10px;
position: absolute;
width: 100%;
}
:where([data-storepress-slider]) .controls > .navigation {
display: flex;
flex-direction: row;
justify-content: space-between;
flex-basis: 100%;
}
:where([data-storepress-slider]) .controls > .navigation button {
position: absolute;
inset: 0;
width: 30px;
aspect-ratio: 1;
}
:where([data-storepress-slider]) .controls > .navigation button:nth-child(1) {
margin-block: auto;
margin-inline: 0 auto;
}
:where([data-storepress-slider]) .controls > .navigation button:nth-child(2) {
margin-block: auto;
margin-inline: auto 0;
}
:where([data-storepress-slider]) .container {
gap: 0;
padding: 0;
margin: 0;
overflow: hidden;
display: flex;
@container style(--is-horizontal:true) {
flex-direction: row;
}
@container style(--is-horizontal:false) {
flex-direction: column;
}
}
:where([data-storepress-slider]) .container > .items {
display: flex;
flex-grow: 0;
flex-shrink: 0;
flex-basis: 100%;
@container style(--is-horizontal:true) {
flex-direction: row;
}
@container style(--is-horizontal:false) {
flex-direction: column;
}
}
:where([data-storepress-slider]) .container > * {
flex-grow: 0;
flex-shrink: 0;
flex-basis: calc(100% / var(--slides-to-show));
}
:where([data-storepress-slider]) .container > * img {
width: 100%;
display: block;
}
</style>
<style>
.main {
display: block;
margin-inline: auto;
width: 800px;
}
.wrapper {
width: 400px;
height: 400px;
}
.container {
box-shadow: 0 0 20px 10px rgba(0, 0, 0, 0.51);
border-radius: 10px;
}
</style>
</head>
<body>
<div class="main">
<div class="wrapper" data-storepress-slider>
<div class="container">
<!--<div class="items">-->
<div class="active"><img src="images/beanie.jpg" /></div>
<div><img src="images/belt.jpg" /></div>
<div><img src="images/cap.jpg" /></div>
<div><img src="images/hoodie-blue-1.jpg" /></div>
<div><img src="images/pennant-1.jpg" /></div>
<div><img src="images/sunglasses-2.jpg" /></div>
<div><img src="images/tshirt-2.jpg" /></div>
<!--</div>-->
</div>
<div class="controls">
<div class="navigation">
<button>LEFT</button>
<button>RIGHT</button>
</div>
<div class="pagination">
<button>1</button>
<button>2</button>
<button>3</button>
<button>4</button>
</div>
</div>
</div>
<div>Another div</div>
</div>
</body>
</html>