回答編集履歴
3
ちょうせい
test
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
|
29
29
|
return loop;
|
30
30
|
|
31
|
-
})(),3
|
31
|
+
})(),3500);
|
32
32
|
|
33
33
|
</script>
|
34
34
|
|
@@ -140,6 +140,6 @@
|
|
140
140
|
|
141
141
|
}
|
142
142
|
|
143
|
-
},3
|
143
|
+
},3500);
|
144
144
|
|
145
145
|
```
|
2
ちょうせい
test
CHANGED
@@ -101,3 +101,45 @@
|
|
101
101
|
```
|
102
102
|
|
103
103
|
※一部バグ修正
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
# 追加
|
108
|
+
|
109
|
+
以下、最初1を3秒間(くらい)とめる
|
110
|
+
|
111
|
+
```javascript
|
112
|
+
|
113
|
+
let count=1;
|
114
|
+
|
115
|
+
window.addEventListener('DOMContentLoaded', ()=>{
|
116
|
+
|
117
|
+
document.querySelector('#slide_wrapp li:first-child').classList.add('prev');
|
118
|
+
|
119
|
+
});
|
120
|
+
|
121
|
+
setInterval(()=>{
|
122
|
+
|
123
|
+
for(let i=0;i<5;i++){
|
124
|
+
|
125
|
+
setTimeout(()=>{
|
126
|
+
|
127
|
+
document.querySelector(`#slide_wrapp li:nth-child(${count})`).classList.remove('ani');
|
128
|
+
|
129
|
+
document.querySelector(`#slide_wrapp li.prev`)?.classList.remove('prev');
|
130
|
+
|
131
|
+
document.querySelector(`#slide_wrapp li:nth-child(${count})`).classList.add('prev');
|
132
|
+
|
133
|
+
count++;
|
134
|
+
|
135
|
+
if(count>4) count=1;
|
136
|
+
|
137
|
+
document.querySelector(`#slide_wrapp li:nth-child(${count})`).classList.add('ani');
|
138
|
+
|
139
|
+
},100*i);
|
140
|
+
|
141
|
+
}
|
142
|
+
|
143
|
+
},3400);
|
144
|
+
|
145
|
+
```
|
1
調整
test
CHANGED
@@ -12,6 +12,10 @@
|
|
12
12
|
|
13
13
|
document.querySelector(`#slide_wrapp li:nth-child(${count})`).classList.remove('ani');
|
14
14
|
|
15
|
+
document.querySelector(`#slide_wrapp li.prev`)?.classList.remove('prev');
|
16
|
+
|
17
|
+
document.querySelector(`#slide_wrapp li:nth-child(${count})`).classList.add('prev');
|
18
|
+
|
15
19
|
count++;
|
16
20
|
|
17
21
|
if(count>4) count=1;
|
@@ -19,8 +23,6 @@
|
|
19
23
|
document.querySelector(`#slide_wrapp li:nth-child(${count})`).classList.add('ani');
|
20
24
|
|
21
25
|
},100*i);
|
22
|
-
|
23
|
-
console.log(count);
|
24
26
|
|
25
27
|
}
|
26
28
|
|
@@ -52,11 +54,17 @@
|
|
52
54
|
|
53
55
|
#slide_wrapp li.ani{
|
54
56
|
|
57
|
+
z-index:2;
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
#slide_wrapp li.prev{
|
62
|
+
|
55
63
|
z-index:1;
|
56
64
|
|
57
65
|
}
|
58
66
|
|
59
|
-
#slide_wrapp li:not(.ani){
|
67
|
+
#slide_wrapp li:not(.ani):not(.prev){
|
60
68
|
|
61
69
|
z-index:0;
|
62
70
|
|
@@ -90,6 +98,6 @@
|
|
90
98
|
|
91
99
|
</ul>
|
92
100
|
|
101
|
+
```
|
93
102
|
|
94
|
-
|
95
|
-
|
103
|
+
※一部バグ修正
|