回答編集履歴
3
オプション追加方法を追記
test
CHANGED
@@ -78,4 +78,24 @@
|
|
78
78
|
|
79
79
|
```
|
80
80
|
|
81
|
+
画像下の黒ぽちは`.slick()`に以下オプションを追加です。
|
82
|
+
|
83
|
+
```js
|
84
|
+
|
85
|
+
$(function(){
|
86
|
+
|
87
|
+
$('.slider > ul').slick({
|
88
|
+
|
89
|
+
autoplay:true,
|
90
|
+
|
91
|
+
autoplaySpeed:5000,
|
92
|
+
|
93
|
+
dots:true,
|
94
|
+
|
95
|
+
});
|
96
|
+
|
97
|
+
});
|
98
|
+
|
99
|
+
```
|
100
|
+
|
81
|
-
[動くサンプル](https://jsfiddle.net/
|
101
|
+
[動くサンプル](https://jsfiddle.net/v7xLr2yp/)
|
2
追記
test
CHANGED
@@ -19,3 +19,63 @@
|
|
19
19
|
```
|
20
20
|
|
21
21
|
[動くサンプル](https://jsfiddle.net/86g0qan7/)
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
###2020/01/01 21:04への返答
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
まず読むCSSに以下を追加で、
|
32
|
+
|
33
|
+
```
|
34
|
+
|
35
|
+
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick-theme.css"/>
|
36
|
+
|
37
|
+
```
|
38
|
+
|
39
|
+
あとは別途下記CSSを追加してください。
|
40
|
+
|
41
|
+
```css
|
42
|
+
|
43
|
+
*{
|
44
|
+
|
45
|
+
box-sizing: border-box;
|
46
|
+
|
47
|
+
margin: 0;
|
48
|
+
|
49
|
+
padding: 0;
|
50
|
+
|
51
|
+
}
|
52
|
+
|
53
|
+
.slider{
|
54
|
+
|
55
|
+
margin: 100px auto;
|
56
|
+
|
57
|
+
width: 80%;
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
.slider img{
|
62
|
+
|
63
|
+
height: auto;
|
64
|
+
|
65
|
+
width: 100%;
|
66
|
+
|
67
|
+
}
|
68
|
+
|
69
|
+
/*slick setting*/
|
70
|
+
|
71
|
+
.slick-prev:before,
|
72
|
+
|
73
|
+
.slick-next:before{
|
74
|
+
|
75
|
+
color: #000 !important;
|
76
|
+
|
77
|
+
}
|
78
|
+
|
79
|
+
```
|
80
|
+
|
81
|
+
[動くサンプル](https://jsfiddle.net/s897pzoy/)
|
1
サンプル追加
test
CHANGED
@@ -17,3 +17,5 @@
|
|
17
17
|
});
|
18
18
|
|
19
19
|
```
|
20
|
+
|
21
|
+
[動くサンプル](https://jsfiddle.net/86g0qan7/)
|