回答編集履歴
1
追記
test
CHANGED
@@ -9,3 +9,63 @@
|
|
9
9
|
|
10
10
|
|
11
11
|
[高さ変更!slickスライダーで画像サイズがバラバラの時の2つの対処法!【jQuery】 | デザインレベルアップ](https://design-levelup.com/webdesign/js/jquery_making_3)
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
# 追記
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
こんな感じではどうでしょうか。
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
[サンプル](https://jsfiddle.net/Lhankor_Mhy/rc64589b/)
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
```css
|
28
|
+
|
29
|
+
.slick-slide img {
|
30
|
+
|
31
|
+
width: auto; /* 変更 */
|
32
|
+
|
33
|
+
height: 100%; /* 変更 */
|
34
|
+
|
35
|
+
}
|
36
|
+
|
37
|
+
.slick-track{ /* 追加 */
|
38
|
+
|
39
|
+
height: 50vh;
|
40
|
+
|
41
|
+
}
|
42
|
+
|
43
|
+
```
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
```js
|
48
|
+
|
49
|
+
$("document").ready(function () {
|
50
|
+
|
51
|
+
$('.mypattern').slick({
|
52
|
+
|
53
|
+
autoplay: true,
|
54
|
+
|
55
|
+
autoplaySpeed: 2500,
|
56
|
+
|
57
|
+
speed: 800,
|
58
|
+
|
59
|
+
arrows: false,
|
60
|
+
|
61
|
+
centerMode: true,
|
62
|
+
|
63
|
+
centerPadding: '25%',
|
64
|
+
|
65
|
+
variableWidth: true, // 追加
|
66
|
+
|
67
|
+
});
|
68
|
+
|
69
|
+
});
|
70
|
+
|
71
|
+
```
|