回答編集履歴
1
コード追記
test
CHANGED
@@ -75,3 +75,49 @@
|
|
75
75
|
}
|
76
76
|
|
77
77
|
```
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
ホバーでフェイドイン/フェイドアウトさせるなら、transition を使った方がシンプルになりますね。
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
```css
|
86
|
+
|
87
|
+
.works {
|
88
|
+
|
89
|
+
font-size: 2rem;
|
90
|
+
|
91
|
+
background-image: url(https://picsum.photos/400/200);
|
92
|
+
|
93
|
+
background-repeat: no-repeat;
|
94
|
+
|
95
|
+
background-size: 3rem;
|
96
|
+
|
97
|
+
background-color:rgba(255,255,255,1);
|
98
|
+
|
99
|
+
background-blend-mode:lighten;
|
100
|
+
|
101
|
+
transition: 1s;
|
102
|
+
|
103
|
+
}
|
104
|
+
|
105
|
+
.works:hover {
|
106
|
+
|
107
|
+
background-color:rgba(255,255,255,0);
|
108
|
+
|
109
|
+
}
|
110
|
+
|
111
|
+
.works span{
|
112
|
+
|
113
|
+
transition: 1s;
|
114
|
+
|
115
|
+
}
|
116
|
+
|
117
|
+
.works:hover span{
|
118
|
+
|
119
|
+
opacity:0;
|
120
|
+
|
121
|
+
}
|
122
|
+
|
123
|
+
```
|