File tree Expand file tree Collapse file tree 1 file changed +21
-20
lines changed Expand file tree Collapse file tree 1 file changed +21
-20
lines changed Original file line number Diff line number Diff line change 22
22
< style >
23
23
html ,
24
24
body {
25
+ font-family : Helvetica Neue, Helvetica, Arial, sans-serif;
26
+ font-size : 14px ;
27
+ margin : 0 ;
28
+ padding : 0 ;
25
29
position : relative;
26
30
height : 100% ;
31
+ background : # 111 ;
32
+ color : # 111 ;
27
33
}
28
34
body {
29
35
background : # 343432 ;
35
41
}
36
42
.swiper {
37
43
width : 100% ;
38
- height : 100% ;
44
+ height : 300px ;
45
+ margin-left : auto;
46
+ margin-right : auto;
39
47
}
40
48
.swiper-slide {
41
49
text-align : center;
42
50
font-size : 18px ;
43
- background : # 343432 ;
44
51
display : flex;
45
52
justify-content : center;
46
53
align-items : center;
54
+ background-size : cover;
55
+ background : # 343432 center;
47
56
}
48
57
.swiper-slide img {
49
58
display : block;
50
59
max-width : 100% ;
51
60
max-height : 100% ;
52
61
object-fit : cover;
53
62
}
54
- body {
55
- background : # 111 ;
56
- color : # 111 ;
57
- }
58
- .swiper {
59
- width : 100% ;
60
- height : 300px ;
61
- margin-left : auto;
62
- margin-right : auto;
63
- }
64
- .swiper-slide {
65
- background-size : cover;
66
- background-position : center;
67
- }
68
63
.mySwiper2 {
69
64
height : 80% ;
70
65
width : 100% ;
149
144
</ div >
150
145
151
146
< script src ="https://cdn.jsdelivr.net/npm/swiper@10/swiper-bundle.min.js "> </ script >
147
+
152
148
< script >
153
149
var swiper = new Swiper ( ".mySwiper" , {
154
- spaceBetween : 10 ,
155
- slidesPerView : 5 ,
156
150
freeMode : true ,
151
+ grabCursor : true ,
152
+ loop : true ,
153
+ mousewheel : true ,
154
+ slidesPerView : 5 ,
155
+ spaceBetween : 10 ,
157
156
watchSlidesProgress : true ,
158
157
} ) ;
159
158
var swiper2 = new Swiper ( ".mySwiper2" , {
160
- spaceBetween : 10 ,
161
- mousewheel : true ,
162
159
grabCursor : true ,
160
+ effect : 'fade' ,
163
161
loop : true ,
162
+ mousewheel : true ,
163
+ spaceBetween : 10 ,
164
+ zoom : true ,
164
165
keyboard : {
165
166
enabled : true ,
166
167
} ,
You can’t perform that action at this time.
0 commit comments