回答編集履歴
2
コード追記
test
CHANGED
@@ -75,3 +75,29 @@
|
|
75
75
|
});
|
76
76
|
|
77
77
|
```
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
---
|
82
|
+
|
83
|
+
正解は下記でした。
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
```css
|
88
|
+
|
89
|
+
.c-scroll-button i {
|
90
|
+
|
91
|
+
transition: transform 500ms ease-out;
|
92
|
+
|
93
|
+
}
|
94
|
+
|
95
|
+
.c-scroll-button.reflect i {
|
96
|
+
|
97
|
+
transform: scale(-1, 1);
|
98
|
+
|
99
|
+
}
|
100
|
+
|
101
|
+
```
|
102
|
+
|
103
|
+
スクリプトは上と同じ。
|
1
コード追記
test
CHANGED
@@ -4,11 +4,15 @@
|
|
4
4
|
|
5
5
|
```css
|
6
6
|
|
7
|
+
.c-scroll-button i {
|
8
|
+
|
9
|
+
transition: transform 500ms ease-out;
|
10
|
+
|
11
|
+
}
|
12
|
+
|
7
13
|
.c-scroll-button i.reflect{
|
8
14
|
|
9
15
|
transform: scale(-1, 1);
|
10
|
-
|
11
|
-
transition: transform 500ms ease-out;
|
12
16
|
|
13
17
|
}
|
14
18
|
|
@@ -33,3 +37,41 @@
|
|
33
37
|
});
|
34
38
|
|
35
39
|
```
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
---
|
44
|
+
|
45
|
+
それともこちらか?
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
```css
|
50
|
+
|
51
|
+
.c-scroll-button {
|
52
|
+
|
53
|
+
transition: transform 500ms ease-out;
|
54
|
+
|
55
|
+
}
|
56
|
+
|
57
|
+
.c-scroll-button.reflect{
|
58
|
+
|
59
|
+
transform: scale(-1, 1);
|
60
|
+
|
61
|
+
}
|
62
|
+
|
63
|
+
```
|
64
|
+
|
65
|
+
```js
|
66
|
+
|
67
|
+
const scrollButton = document.querySelector('.c-scroll-button');
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
scrollButton.addEventListener('click', function(){
|
72
|
+
|
73
|
+
this.classList.toggle('reflect');
|
74
|
+
|
75
|
+
});
|
76
|
+
|
77
|
+
```
|