質問編集履歴
3
コードの掲載
test
CHANGED
File without changes
|
test
CHANGED
@@ -21,3 +21,435 @@
|
|
21
21
|
|
22
22
|
|
23
23
|
よろしくお願いいたします。
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
**追記**
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
コードの提示をご依頼いただいたので記述いたします。
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
```HTML
|
36
|
+
|
37
|
+
<div class="main-visual">
|
38
|
+
|
39
|
+
<div class="add-wrapper">
|
40
|
+
|
41
|
+
<div class="swiper-container swiper1">
|
42
|
+
|
43
|
+
<div class="swiper-wrapper">
|
44
|
+
|
45
|
+
<div class="swiper-slide slide1">
|
46
|
+
|
47
|
+
<a href="<?php echo MODULE_WEB_ROOT; ?>findinfo" class="cover"></a>
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div class="swiper-slide slide2">
|
52
|
+
|
53
|
+
<a href="<?php echo MODULE_WEB_ROOT; ?>findinfo" class="cover"></a>
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<div class="swiper-slide slide3">
|
58
|
+
|
59
|
+
<a href="<?php echo MODULE_WEB_ROOT; ?>findinfo" class="cover"></a>
|
60
|
+
|
61
|
+
</div>
|
62
|
+
|
63
|
+
<div class="swiper-slide slide4">
|
64
|
+
|
65
|
+
<a href="<?php echo MODULE_WEB_ROOT; ?>findinfo" class="cover"></a>
|
66
|
+
|
67
|
+
</div>
|
68
|
+
|
69
|
+
<div class="swiper-slide slide5">
|
70
|
+
|
71
|
+
<a href="<?php echo MODULE_WEB_ROOT; ?>findinfo" class="cover"></a>
|
72
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
</div>
|
76
|
+
|
77
|
+
<!-- swiperのページネーション -->
|
78
|
+
|
79
|
+
<div class="swiper-pagination page1"></div>
|
80
|
+
|
81
|
+
<!-- ナビゲーション -->
|
82
|
+
|
83
|
+
<div class="swiper-button-prev prev1"></div>
|
84
|
+
|
85
|
+
<div class="swiper-button-next next1"></div>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
```
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
```CSS
|
98
|
+
|
99
|
+
.main-visual {
|
100
|
+
|
101
|
+
width: 100%;
|
102
|
+
|
103
|
+
height: 522px;
|
104
|
+
|
105
|
+
background-image: url(../background-image);
|
106
|
+
|
107
|
+
background-repeat: repeat;
|
108
|
+
|
109
|
+
z-index: 0;
|
110
|
+
|
111
|
+
background-color: #F0F0F0;
|
112
|
+
|
113
|
+
overflow-x: hidden;
|
114
|
+
|
115
|
+
overflow-y: hidden;
|
116
|
+
|
117
|
+
position: relative;
|
118
|
+
|
119
|
+
}
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
.add-wrapper {
|
124
|
+
|
125
|
+
margin-left: auto;
|
126
|
+
|
127
|
+
margin-right: auto;
|
128
|
+
|
129
|
+
max-width: 900px;
|
130
|
+
|
131
|
+
}
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
.swiper1 {
|
136
|
+
|
137
|
+
width: 100%;
|
138
|
+
|
139
|
+
overflow: visible;
|
140
|
+
|
141
|
+
z-index: 1;
|
142
|
+
|
143
|
+
height: 520px;
|
144
|
+
|
145
|
+
}
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
.swiper1 .swiper-slide {
|
150
|
+
|
151
|
+
vertical-align: middle;
|
152
|
+
|
153
|
+
margin-top: 88px;
|
154
|
+
|
155
|
+
position: relative;
|
156
|
+
|
157
|
+
transition: all .7s cubic-bezier(0.165, 0.84, 0.44, 1) 0s;
|
158
|
+
|
159
|
+
height: 335px !important;
|
160
|
+
|
161
|
+
}
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
.swiper1 .swiper-slide .mv-img {
|
166
|
+
|
167
|
+
width: 670px !important;
|
168
|
+
|
169
|
+
height: 335px !important;
|
170
|
+
|
171
|
+
}
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
.swiper1 .swiper-slide-active {
|
176
|
+
|
177
|
+
height: 450px !important;
|
178
|
+
|
179
|
+
width: 900px !important;
|
180
|
+
|
181
|
+
margin-top: 30px;
|
182
|
+
|
183
|
+
}
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
.swiper1 .swiper-slide-active .mv-img {
|
188
|
+
|
189
|
+
height: 450px !important;
|
190
|
+
|
191
|
+
width: 900px !important;
|
192
|
+
|
193
|
+
}
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
.swiper1 .swiper-slide-prev,
|
198
|
+
|
199
|
+
.swiper1 .swiper-slide-next {
|
200
|
+
|
201
|
+
width: 100% !important;
|
202
|
+
|
203
|
+
height: 335px !important;
|
204
|
+
|
205
|
+
}
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
.swiper1 .swiper-slide-prev::after,
|
210
|
+
|
211
|
+
.swiper1 .swiper-slide-next::after {
|
212
|
+
|
213
|
+
content: "";
|
214
|
+
|
215
|
+
position: absolute;
|
216
|
+
|
217
|
+
display: block;
|
218
|
+
|
219
|
+
top: 0;
|
220
|
+
|
221
|
+
left: 0;
|
222
|
+
|
223
|
+
width: 100%;
|
224
|
+
|
225
|
+
height: 100%;
|
226
|
+
|
227
|
+
background: rgba(0, 0, 0, 0.7);
|
228
|
+
|
229
|
+
}
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
.swiper1 .swiper-slide-prev .mv-img {
|
234
|
+
|
235
|
+
width: 670px !important;
|
236
|
+
|
237
|
+
height: 335px !important;
|
238
|
+
|
239
|
+
position: absolute;
|
240
|
+
|
241
|
+
top: 0;
|
242
|
+
|
243
|
+
right: 0;
|
244
|
+
|
245
|
+
}
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
.swiper1 .swiper-slide-next .mv-img {
|
250
|
+
|
251
|
+
width: 670px !important;
|
252
|
+
|
253
|
+
height: 335px !important;
|
254
|
+
|
255
|
+
position: absolute;
|
256
|
+
|
257
|
+
top: 0;
|
258
|
+
|
259
|
+
left: 0;
|
260
|
+
|
261
|
+
}
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
.swiper1 .swiper-pagination {
|
266
|
+
|
267
|
+
width: 100%;
|
268
|
+
|
269
|
+
left: 0;
|
270
|
+
|
271
|
+
bottom: 10px;
|
272
|
+
|
273
|
+
}
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
.swiper1 .swiper-button-next,
|
278
|
+
|
279
|
+
.swiper1 .swiper-button-prev {
|
280
|
+
|
281
|
+
transform: translateY(-50%) translateX(-50%);
|
282
|
+
|
283
|
+
-webkit-transform: translateY(-50%) translateX(-50%);
|
284
|
+
|
285
|
+
margin-top: 0;
|
286
|
+
|
287
|
+
}
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
.swiper1 .swiper-button-next{
|
292
|
+
|
293
|
+
right: calc(-50vw + 470px);
|
294
|
+
|
295
|
+
width: 32px;
|
296
|
+
|
297
|
+
height: 60px;
|
298
|
+
|
299
|
+
background-image: url(../swiper-button-image);
|
300
|
+
|
301
|
+
}
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
.swiper1 .swiper-button-prev{
|
306
|
+
|
307
|
+
left: calc(-50vw + 496px);
|
308
|
+
|
309
|
+
width: 32px;
|
310
|
+
|
311
|
+
height: 60px;
|
312
|
+
|
313
|
+
background-image: url(../swiper-button-image);
|
314
|
+
|
315
|
+
}
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
.swiper-pagination-bullet-active {
|
320
|
+
|
321
|
+
opacity: 1;
|
322
|
+
|
323
|
+
background: #91d539;
|
324
|
+
|
325
|
+
}
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
.swiper1 .slide1 {
|
330
|
+
|
331
|
+
background-image: url(../slide-image);
|
332
|
+
|
333
|
+
background-position: center;
|
334
|
+
|
335
|
+
background-size: cover;
|
336
|
+
|
337
|
+
background-repeat: no-repeat;
|
338
|
+
|
339
|
+
}
|
340
|
+
|
341
|
+
.swiper1 .slide2 {
|
342
|
+
|
343
|
+
background-image: url(../slide-image);
|
344
|
+
|
345
|
+
background-position: center;
|
346
|
+
|
347
|
+
background-size: cover;
|
348
|
+
|
349
|
+
background-repeat: no-repeat;
|
350
|
+
|
351
|
+
}
|
352
|
+
|
353
|
+
.swiper1 .slide3 {
|
354
|
+
|
355
|
+
background-image: url(../slide-image);
|
356
|
+
|
357
|
+
background-position: center;
|
358
|
+
|
359
|
+
background-size: cover;
|
360
|
+
|
361
|
+
background-repeat: no-repeat;
|
362
|
+
|
363
|
+
}
|
364
|
+
|
365
|
+
.swiper1 .slide4 {
|
366
|
+
|
367
|
+
background-image: url(../slide-image);
|
368
|
+
|
369
|
+
background-position: center;
|
370
|
+
|
371
|
+
background-size: cover;
|
372
|
+
|
373
|
+
background-repeat: no-repeat;
|
374
|
+
|
375
|
+
}
|
376
|
+
|
377
|
+
.swiper1 .slide5 {
|
378
|
+
|
379
|
+
background-image: url(../slide-image);
|
380
|
+
|
381
|
+
background-position: center;
|
382
|
+
|
383
|
+
background-size: cover;
|
384
|
+
|
385
|
+
background-repeat: no-repeat;
|
386
|
+
|
387
|
+
}
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
```
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
```JavaScript
|
396
|
+
|
397
|
+
window.addEventListener('load', function() {
|
398
|
+
|
399
|
+
var mySwiper = new Swiper ('.swiper1', {
|
400
|
+
|
401
|
+
loop: true,
|
402
|
+
|
403
|
+
slidesPerView: '1',
|
404
|
+
|
405
|
+
centeredSlides : true,
|
406
|
+
|
407
|
+
loopedSlides:5,
|
408
|
+
|
409
|
+
spaceBetween: 0,
|
410
|
+
|
411
|
+
clickable: true,
|
412
|
+
|
413
|
+
breakpoints: {
|
414
|
+
|
415
|
+
960: {
|
416
|
+
|
417
|
+
slidesPerView: 1,
|
418
|
+
|
419
|
+
spaceBetween: 0
|
420
|
+
|
421
|
+
}
|
422
|
+
|
423
|
+
},
|
424
|
+
|
425
|
+
navigation: {
|
426
|
+
|
427
|
+
nextEl: '.next1',
|
428
|
+
|
429
|
+
prevEl: '.prev1',
|
430
|
+
|
431
|
+
},
|
432
|
+
|
433
|
+
pagination: {
|
434
|
+
|
435
|
+
el: '.page1',
|
436
|
+
|
437
|
+
},
|
438
|
+
|
439
|
+
autoplay: {
|
440
|
+
|
441
|
+
delay: 7000,
|
442
|
+
|
443
|
+
disableOnInteraction: false
|
444
|
+
|
445
|
+
},
|
446
|
+
|
447
|
+
speed: 700,
|
448
|
+
|
449
|
+
roundLengths: true,
|
450
|
+
|
451
|
+
});
|
452
|
+
|
453
|
+
}, false);
|
454
|
+
|
455
|
+
```
|
2
画像の差し替え
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,13 +6,13 @@
|
|
6
6
|
|
7
7
|
最終的な表示は下記のスクリーンショットです。↓
|
8
8
|
|
9
|
-
![
|
9
|
+
![イメージ説明](50bc7d747d1d5a4fe87ae432e3543e3d.png)
|
10
10
|
|
11
11
|
|
12
12
|
|
13
13
|
ただ、ページをロードすると、読み込み途中にCSS適用前の画像が横並びに表示されてしまいます。↓
|
14
14
|
|
15
|
-
![イメージ説明](d
|
15
|
+
![イメージ説明](cdc2d95624d2b3fe05367bc4d0946121.png)
|
16
16
|
|
17
17
|
|
18
18
|
|
1
文言修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
|
19
|
-
ユーザーには
|
19
|
+
ユーザーには常に1枚目の状態で画像を表示させたいのですが、画像2枚目のような表示を防ぐ方法があればご教示いただけますと幸いです。
|
20
20
|
|
21
21
|
|
22
22
|
|