質問編集履歴
1
コードを追記しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -213,3 +213,199 @@
|
|
213
213
|
}
|
214
214
|
|
215
215
|
```
|
216
|
+
|
217
|
+
```ここに言語を入力
|
218
|
+
@media(max-width:768px) {
|
219
|
+
/*-------------------------------------------
|
220
|
+
Menu
|
221
|
+
-------------------------------------------*/
|
222
|
+
#navi{
|
223
|
+
display:none;
|
224
|
+
}
|
225
|
+
#navi.open {
|
226
|
+
display:block;
|
227
|
+
opacity: 1;
|
228
|
+
}
|
229
|
+
#navi {
|
230
|
+
width: 100%;
|
231
|
+
height: 100vh;
|
232
|
+
background: rgba(247, 94, 94, 0.7);
|
233
|
+
padding: 25px;
|
234
|
+
position: fixed;
|
235
|
+
top: 0;
|
236
|
+
left:0;
|
237
|
+
bottom: 0;
|
238
|
+
opacity: 0;
|
239
|
+
overflow-y: auto;
|
240
|
+
transition: 0.5s;
|
241
|
+
z-index: 20;
|
242
|
+
}
|
243
|
+
|
244
|
+
#navi .list-nav {
|
245
|
+
display: flex;
|
246
|
+
justify-content: space-between;
|
247
|
+
align-items:center;
|
248
|
+
flex-direction: column;
|
249
|
+
margin-left:0;
|
250
|
+
}
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
#navi ul.nav-menu {
|
255
|
+
margin-bottom: 30px;
|
256
|
+
}
|
257
|
+
|
258
|
+
#navi ul li {
|
259
|
+
padding: 10px 0;
|
260
|
+
margin-bottom:22px;
|
261
|
+
}
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
#navi .contact {
|
266
|
+
position: absolute;
|
267
|
+
bottom: 0;
|
268
|
+
right: 120px;
|
269
|
+
width: 150px;
|
270
|
+
height: 150px;
|
271
|
+
background-color: #000;
|
272
|
+
border-radius: 50%;
|
273
|
+
}
|
274
|
+
|
275
|
+
#navi .contact a {
|
276
|
+
display: block;
|
277
|
+
width: 100%;
|
278
|
+
height: 100%;
|
279
|
+
border-radius: 50%;
|
280
|
+
color: #fff;
|
281
|
+
}
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
#navi .contact img {
|
286
|
+
position: absolute;
|
287
|
+
top: 33px;
|
288
|
+
left: 50%;
|
289
|
+
transform: translateX(-50%);
|
290
|
+
width: 70px;
|
291
|
+
height: 55px;
|
292
|
+
|
293
|
+
}
|
294
|
+
|
295
|
+
#navi .contact p {
|
296
|
+
position: absolute;
|
297
|
+
left: 0;
|
298
|
+
right: 0;
|
299
|
+
text-align: center;
|
300
|
+
bottom: 23px;
|
301
|
+
}
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
#navi .logo{
|
310
|
+
display:none;
|
311
|
+
}
|
312
|
+
.sp-contact{
|
313
|
+
display:block;
|
314
|
+
}
|
315
|
+
.sp-contact img{
|
316
|
+
width:70px;
|
317
|
+
height:55px;
|
318
|
+
}
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
/*スマホ時改行*/
|
323
|
+
.sp-br {
|
324
|
+
display: block;
|
325
|
+
}
|
326
|
+
|
327
|
+
/*PC時の改行は非表示*/
|
328
|
+
.pc-br {
|
329
|
+
display: none;
|
330
|
+
}
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
/*
|
335
|
+
ハンバーガ―メニュー
|
336
|
+
*/
|
337
|
+
.hamburger {
|
338
|
+
display: block;
|
339
|
+
width: 100px;
|
340
|
+
height: 100px;
|
341
|
+
position: fixed;
|
342
|
+
top: 0;
|
343
|
+
right: 0;
|
344
|
+
z-index: 30;
|
345
|
+
cursor: pointer;
|
346
|
+
transition: 0.3s;
|
347
|
+
}
|
348
|
+
|
349
|
+
.hamburger:hover {
|
350
|
+
opacity: 0.7;
|
351
|
+
}
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
/* ハンバーガーメニューの線の設定(メニューが閉じている時) */
|
356
|
+
.hamburger span {
|
357
|
+
width: 50px;
|
358
|
+
height: 2px;
|
359
|
+
background: #000;
|
360
|
+
position: absolute;
|
361
|
+
left: 25px;
|
362
|
+
transition: 0.3s ease-in-out;
|
363
|
+
}
|
364
|
+
/*指定した領域だけハンバーガーメニューの色を変える*/
|
365
|
+
|
366
|
+
.hamburger span.is-in {
|
367
|
+
background-color: #fff;
|
368
|
+
}
|
369
|
+
|
370
|
+
/* 1本目の線の位置を設定 */
|
371
|
+
.hamburger span:nth-child(1) {
|
372
|
+
top: 36px;
|
373
|
+
}
|
374
|
+
|
375
|
+
/* 2本目の線の位置を設定 */
|
376
|
+
.hamburger span:nth-child(2) {
|
377
|
+
top: 50px;
|
378
|
+
}
|
379
|
+
|
380
|
+
/* 3本目の線の位置を設定 */
|
381
|
+
.hamburger span:nth-child(3) {
|
382
|
+
top: 64px;
|
383
|
+
}
|
384
|
+
|
385
|
+
/*
|
386
|
+
ハンバーガーメニューの線の設定(メニューが開いている時)
|
387
|
+
1本目の線を-45度回転
|
388
|
+
*/
|
389
|
+
.hamburger.active span:nth-child(1) {
|
390
|
+
top: 47px;
|
391
|
+
left: 25px;
|
392
|
+
background: #000;
|
393
|
+
transform: rotate(-45deg);
|
394
|
+
}
|
395
|
+
|
396
|
+
/* 2本目と3本目は重ねて45度回転 */
|
397
|
+
.hamburger.active span:nth-child(2),
|
398
|
+
.hamburger.active span:nth-child(3) {
|
399
|
+
top: 47px;
|
400
|
+
background: #000;
|
401
|
+
transform: rotate(45deg);
|
402
|
+
}
|
403
|
+
|
404
|
+
.hamburger {
|
405
|
+
color: #000;
|
406
|
+
transition: color 0.4s ease-out;
|
407
|
+
}
|
408
|
+
|
409
|
+
```
|
410
|
+
上記コードをつきました。
|
411
|
+
スマホサイズにしたときに、ハンバーガーメニューをクリックするとでてくるナビゲーションメニューです
|