回答編集履歴
4
修正
test
CHANGED
@@ -202,8 +202,6 @@
|
|
202
202
|
|
203
203
|
animation: change-bgcolor 60s cubic-bezier(0, 1, 0, 1) infinite;
|
204
204
|
|
205
|
-
position: absolute;
|
206
|
-
|
207
205
|
}
|
208
206
|
|
209
207
|
|
3
修正
test
CHANGED
@@ -178,13 +178,13 @@
|
|
178
178
|
|
179
179
|
@keyframes bgAnime {
|
180
180
|
|
181
|
-
0% { background-image : url("
|
181
|
+
0% { background-image : url("doraemon_background_1.png"); }
|
182
|
-
|
182
|
+
|
183
|
-
25% { background-image : url("
|
183
|
+
25% { background-image : url("doraemon_kabegami1.png"); }
|
184
|
-
|
184
|
+
|
185
|
-
50% { background-image : url("
|
185
|
+
50% { background-image : url("doraemon_background_2.png"); }
|
186
|
-
|
186
|
+
|
187
|
-
75% { background-image : url("
|
187
|
+
75% { background-image : url("doraemon_kabegami1.png"); }
|
188
188
|
|
189
189
|
}
|
190
190
|
|
2
質問編集にあわせて追記
test
CHANGED
@@ -109,3 +109,131 @@
|
|
109
109
|
}
|
110
110
|
|
111
111
|
```
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
### 質問編集にあわせて追記
|
116
|
+
|
117
|
+
```html
|
118
|
+
|
119
|
+
<div class="bg_img">
|
120
|
+
|
121
|
+
<div class="sample">
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
-テキスト・画像
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
</div>
|
132
|
+
|
133
|
+
</div>
|
134
|
+
|
135
|
+
```
|
136
|
+
|
137
|
+
```css
|
138
|
+
|
139
|
+
* {
|
140
|
+
|
141
|
+
padding: 0;
|
142
|
+
|
143
|
+
margin: 0;
|
144
|
+
|
145
|
+
}
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
html,
|
150
|
+
|
151
|
+
body {
|
152
|
+
|
153
|
+
width: 100%;
|
154
|
+
|
155
|
+
height:300%;
|
156
|
+
|
157
|
+
}
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
.bg_img {
|
162
|
+
|
163
|
+
background-image : url("http://placehold.jp/150x150.png?text=doraemon_background_1.png");
|
164
|
+
|
165
|
+
background-size: cover;
|
166
|
+
|
167
|
+
min-height: 300%;
|
168
|
+
|
169
|
+
background-attachment: fixed;
|
170
|
+
|
171
|
+
overflow : hidden;
|
172
|
+
|
173
|
+
animation : bgAnime 40s infinite;
|
174
|
+
|
175
|
+
}
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
@keyframes bgAnime {
|
180
|
+
|
181
|
+
0% { background-image : url("http://placehold.jp/150x150.png?text=doraemon_background_1.png"); }
|
182
|
+
|
183
|
+
25% { background-image : url("http://placehold.jp/150x150.png?text=doraemon_kabegami1.png"); }
|
184
|
+
|
185
|
+
50% { background-image : url("http://placehold.jp/150x150.png?text=doraemon_background_2.png"); }
|
186
|
+
|
187
|
+
75% { background-image : url("http://placehold.jp/150x150.png?text=doraemon_kabegami1.png"); }
|
188
|
+
|
189
|
+
}
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
.sample {
|
194
|
+
|
195
|
+
background-color: rgba(255, 255, 255, 0.5);
|
196
|
+
|
197
|
+
height: 100%;
|
198
|
+
|
199
|
+
width: 50%; /* 透かしにする背景色の横の長さはここで調整 */
|
200
|
+
|
201
|
+
margin: 0 auto;
|
202
|
+
|
203
|
+
animation: change-bgcolor 60s cubic-bezier(0, 1, 0, 1) infinite;
|
204
|
+
|
205
|
+
position: absolute;
|
206
|
+
|
207
|
+
}
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
@keyframes change-bgcolor {
|
212
|
+
|
213
|
+
25% {
|
214
|
+
|
215
|
+
background-color: rgba(255, 255, 255, 0.5);
|
216
|
+
|
217
|
+
}
|
218
|
+
|
219
|
+
50% {
|
220
|
+
|
221
|
+
background-color: rgba(255, 0, 0, 0.5);
|
222
|
+
|
223
|
+
}
|
224
|
+
|
225
|
+
75% {
|
226
|
+
|
227
|
+
background-color: rgba(0, 255, 0, 0.5);
|
228
|
+
|
229
|
+
}
|
230
|
+
|
231
|
+
100% {
|
232
|
+
|
233
|
+
background-color: rgba(0, 0, 255, 0.5);
|
234
|
+
|
235
|
+
}
|
236
|
+
|
237
|
+
```
|
238
|
+
|
239
|
+
もしかして、こういうことでしょうか? `.bg_img .hat`はいらない……?
|
1
訂正
test
CHANGED
@@ -80,13 +80,13 @@
|
|
80
80
|
|
81
81
|
.bg_img .src1 {
|
82
82
|
|
83
|
-
background-image : url("
|
83
|
+
background-image : url("doraemon_background_1.png"); /* 背景の画像を指定 */
|
84
84
|
|
85
85
|
}
|
86
86
|
|
87
87
|
.bg_img .src2 {
|
88
88
|
|
89
|
-
background-image : url("
|
89
|
+
background-image : url("doraemon_kabegami1.png"); /* 背景の画像を指定 */
|
90
90
|
|
91
91
|
animation-delay : 10s;
|
92
92
|
|
@@ -94,7 +94,7 @@
|
|
94
94
|
|
95
95
|
.bg_img .src3 {
|
96
96
|
|
97
|
-
background-image : url("
|
97
|
+
background-image : url("doraemon_background2.png"); /* 背景の画像を指定 */
|
98
98
|
|
99
99
|
animation-delay : 20s;
|
100
100
|
|
@@ -102,7 +102,7 @@
|
|
102
102
|
|
103
103
|
.bg_img .src4 {
|
104
104
|
|
105
|
-
background-image : url("
|
105
|
+
background-image : url("doraemon_kabegami1.png"); /* 背景の画像を指定 */
|
106
106
|
|
107
107
|
animation-delay : 30s;
|
108
108
|
|