質問編集履歴

1

scssのheader内全文を追記致しました。

2021/03/06 13:16

投稿

duu
duu

スコア1

test CHANGED
File without changes
test CHANGED
@@ -96,90 +96,650 @@
96
96
 
97
97
 
98
98
 
99
+
100
+
99
- コンパル後➤
101
+ ![メージ説明](43f3d70a7979e968b5bbe4577143483f.png)
100
-
101
-
102
-
102
+
103
+
104
+
105
+
106
+
103
- ```CSS
107
+ ```scss
104
-
108
+
105
- #header .header__title {
109
+ @charset "UTF-8";
110
+
111
+
112
+
106
-
113
+ /* 関数 */
114
+
107
- color: #ffffff;
115
+ $white:#ffffff;
116
+
108
-
117
+ $black:#222;
118
+
119
+ $gray:#525252;
120
+
121
+ $back:#F2F2F2;
122
+
123
+ $fontM: 'Montserrat', sans-serif;
124
+
125
+ $fontS: 'Noto Sans JP', sans-serif;
126
+
127
+ $fontY:"游ゴシック体", YuGothic, "游ゴシック Medium", "Yu Gothic Medium", "游ゴシック", "Yu Gothic", sans-serif;
128
+
129
+ $textMargin:30px 0;
130
+
131
+
132
+
133
+ @mixin padding($padding){
134
+
135
+ padding-left: $padding;
136
+
137
+ padding-right: $padding;
138
+
139
+ }
140
+
141
+
142
+
143
+ @mixin header-image($width,$height){
144
+
145
+ width: $width;
146
+
147
+ height: $height;
148
+
149
+ margin:0 calc(50% - 50vw);
150
+
151
+ position: absolute;
152
+
153
+ top: 0;
154
+
155
+ z-index: -2;
156
+
157
+ }
158
+
159
+ @mixin header-black($width,$height){
160
+
161
+ background:$black;
162
+
163
+ width: $width;
164
+
165
+ height: $height;
166
+
167
+ position: absolute;
168
+
169
+ right: 0;
170
+
171
+ top: 0;
172
+
173
+ z-index: -3;
174
+
175
+ }
176
+
177
+
178
+
179
+ @mixin header-title($width){
180
+
181
+ color: $white;
182
+
109
- height: 100vh;
183
+ height: $width;
110
-
111
- display: -webkit-box;
112
-
113
- display: -ms-flexbox;
114
184
 
115
185
  display: flex;
116
186
 
117
- -webkit-box-orient: vertical;
118
-
119
- -webkit-box-direction: normal;
120
-
121
- -ms-flex-direction: column;
122
-
123
- flex-direction: column;
124
-
125
- -webkit-box-align: end;
126
-
127
- -ms-flex-align: end;
128
-
129
- align-items: flex-end;
130
-
131
- -webkit-box-pack: center;
132
-
133
- -ms-flex-pack: center;
134
-
135
- justify-content: center;
136
-
137
- }
138
-
139
-
140
-
141
- #header .header__title-about {
142
-
143
- color: #ffffff;
144
-
145
- height: 63vh;
146
-
147
- display: -webkit-box;
148
-
149
- display: -ms-flexbox;
187
+ flex-direction: column;
188
+
189
+ align-items: flex-end;
190
+
191
+ justify-content: center;
192
+
193
+ }
194
+
195
+
196
+
197
+
198
+
199
+ @mixin description($weight){
200
+
201
+ font-family: $fontY;
202
+
203
+ font-weight: $weight;
204
+
205
+ font-size: 1.6rem;
206
+
207
+ padding-top: 17px;
208
+
209
+ padding-bottom: 18px;
210
+
211
+
212
+
213
+ }
214
+
215
+ /* 共通 */
216
+
217
+ html{
218
+
219
+ font-size: 62.5%;
220
+
221
+ scroll-behavior: smooth;
222
+
223
+ }
224
+
225
+
226
+
227
+ body *{
228
+
229
+ box-sizing: border-box;
230
+
231
+
232
+
233
+ }
234
+
235
+ body{
236
+
237
+ &::after{
238
+
239
+ content: '';
240
+
241
+ position: fixed;
242
+
243
+ top: 0;
244
+
245
+ left: 0;
246
+
247
+ width: 100%;
248
+
249
+ height: 100%;
250
+
251
+ background-color:#fff; /* 背景カラー */
252
+
253
+ z-index: 9999; /* 一番手前に */
254
+
255
+ pointer-events: none; /* 他の要素にアクセス可能にするためにポインターイベントは無効に */
256
+
257
+ opacity: 0; /* 初期値 : 透過状態 */
258
+
259
+ -webkit-transition: opacity .4s linear; /* アニメーション時間は 0.8秒 */
260
+
261
+ transition: opacity .4s linear;
262
+
263
+ }
264
+
265
+ &.fadeout::after{
266
+
267
+ opacity:1;
268
+
269
+ -webkit-transition: opacity .4s linear; /* アニメーション時間は 0.8秒 */
270
+
271
+ transition: opacity .4s linear;
272
+
273
+ }
274
+
275
+ }
276
+
277
+ section{
278
+
279
+ @include padding(170px);
280
+
281
+ font-family: $fontM;
282
+
283
+ font-family: $fontS;
284
+
285
+ font-family: $fontY;
286
+
287
+ }
288
+
289
+
290
+
291
+ .read_more{
292
+
293
+ width: 160px;
294
+
295
+ height: 36px;
296
+
297
+ background-color: $black;
150
298
 
151
299
  display: flex;
152
300
 
153
- -webkit-box-orient: vertical;
154
-
155
- -webkit-box-direction: normal;
156
-
157
- -ms-flex-direction: column;
158
-
159
- flex-direction: column;
160
-
161
- -webkit-box-align: end;
162
-
163
- -ms-flex-align: end;
164
-
165
- align-items: flex-end;
166
-
167
- -webkit-box-pack: center;
168
-
169
- -ms-flex-pack: center;
170
-
171
- justify-content: center;
172
-
173
- }
301
+ justify-content: center;
302
+
303
+ align-items: center;
304
+
305
+ text-align: center;
306
+
307
+ a{
308
+
309
+ border: none;
310
+
311
+ display: block;
312
+
313
+ width: 100%;
314
+
315
+ color: $white;
316
+
317
+ background-color: $black;
318
+
319
+ text-decoration: none;
320
+
321
+ font-style: $fontM;
322
+
323
+ font-weight: bold;
324
+
325
+ }
326
+
327
+
328
+
329
+ }
330
+
331
+
332
+
333
+ h2{
334
+
335
+ font-family: $fontM;
336
+
337
+ font-weight: bold;
338
+
339
+ font-size: 3.2rem;
340
+
341
+ line-height: (94 / 32);
342
+
343
+ }
344
+
345
+
346
+
347
+ h3{
348
+
349
+ font-size: 2.4rem;
350
+
351
+ font-weight: bold;
352
+
353
+ font-family: $fontY;
354
+
355
+ }
356
+
357
+ p{
358
+
359
+ font-size: 1.6rem;
360
+
361
+ }
362
+
363
+
364
+
365
+ li{
366
+
367
+ list-style: none;
368
+
369
+ }
370
+
371
+
372
+
373
+ //HEADER
374
+
375
+ #header{
376
+
377
+ margin: 0 calc(50% - 50vw);
378
+
379
+ // height: 100vh;
380
+
381
+ position: relative;
382
+
383
+ .header__background{
384
+
385
+ background:url(../images/kv-img2x.png)no-repeat center/cover;
386
+
387
+ @include header-image(76vw,86vh );
388
+
389
+
390
+
391
+ &-about{
392
+
393
+ background: url(../images/heading-img@2x.png)no-repeat center/cover;
394
+
395
+ @include header-image(76vw,52vh );
396
+
397
+ }
398
+
399
+
400
+
401
+ }
402
+
403
+ .header__background--black{
404
+
405
+ @include header-black(50%,100vh );
406
+
407
+ &-about{
408
+
409
+ @include header-black(50%,63vh );
410
+
411
+ }
412
+
413
+ }
414
+
415
+ .header__background--gray{
416
+
417
+ width: 100vw;
418
+
419
+ height: 100vh;
420
+
421
+ background-color: rgba($color: $black, $alpha: 0.6);
422
+
423
+ display: none;
424
+
425
+ position: absolute;
426
+
427
+ z-index: -1;
428
+
429
+
430
+
431
+ }
432
+
433
+ .header__title{
434
+
435
+
436
+
437
+ @include header-title(100vh);
438
+
439
+ &-about{
440
+
441
+ @include header-title(63vh);
442
+
443
+ }
444
+
445
+
446
+
447
+ &--subtitle{
448
+
449
+ font-family: $fontY;
450
+
451
+ font-family: $fontM;
452
+
453
+ font-size: 2rem;
454
+
455
+ line-height: 1;
456
+
457
+ font-weight: bold;
458
+
459
+ }
460
+
461
+ &--maintitle{
462
+
463
+ font-family: $fontM;
464
+
465
+ font-size: 7.2rem;
466
+
467
+ line-height: (86 / 72);
468
+
469
+ font-weight: bold;
470
+
471
+
472
+
473
+ }
474
+
475
+ }
476
+
477
+ .header__nav{
478
+
479
+ display: flex;
480
+
481
+ width: 100vw;
482
+
483
+ justify-content: space-between;
484
+
485
+ align-items: center;
486
+
487
+ padding: 30px 58px 30px;
488
+
489
+ position: fixed;
490
+
491
+ z-index: 1;
492
+
493
+
494
+
495
+ &.withColor{
496
+
497
+ transition: all 0.3s ease;
498
+
499
+ background-color:rgba($color: $black, $alpha: 0.9)
500
+
501
+ }
502
+
503
+
504
+
505
+ &--logo.gray{
506
+
507
+ opacity: 0.4;
508
+
509
+ }
510
+
511
+
512
+
513
+
514
+
515
+ &--menu{
516
+
517
+ display: flex;
518
+
519
+ align-items: center;
520
+
521
+ color: $white;
522
+
523
+ z-index: 99;
524
+
525
+ cursor: pointer;
526
+
527
+ &-bar{
528
+
529
+ width: 61px;
530
+
531
+ height: 13px;
532
+
533
+ display: flex;
534
+
535
+ justify-content: center;
536
+
537
+ align-items: center;
538
+
539
+ z-index: 90;
540
+
541
+
542
+
543
+
544
+
545
+ &,&::before,&::after{
546
+
547
+ content: '';
548
+
549
+ display: block;
550
+
551
+ height: 3px;
552
+
553
+ width: 25px;
554
+
555
+ border-radius: 3px;
556
+
557
+ background-color: $white;
558
+
559
+ position: absolute;
560
+
561
+ }
562
+
563
+ &::before{
564
+
565
+ bottom: 5px;
566
+
567
+ }
568
+
569
+ &::after{
570
+
571
+ top: 5px;
572
+
573
+ }
574
+
575
+ }
576
+
577
+ p{
578
+
579
+ margin-left: 39px;
580
+
581
+ font-family: $fontM;
582
+
583
+ font-size: 1rem;
584
+
585
+ font-weight: bold;
586
+
587
+ }
588
+
589
+
590
+
591
+
592
+
593
+ &.open .header__nav--menu-bar{
594
+
595
+ background-color: rgba(255, 255, 255, 0);
596
+
597
+ }
598
+
599
+ &.open .header__nav--menu-bar::before{
600
+
601
+ transform: rotate(45deg);
602
+
603
+ bottom: 0;
604
+
605
+ }
606
+
607
+ &.open .header__nav--menu-bar::after{
608
+
609
+ transform: rotate(-45deg);
610
+
611
+ top: 0;
612
+
613
+ }
614
+
615
+ }
616
+
617
+
618
+
619
+
620
+
621
+ }
622
+
623
+ }
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+ //NAVIGATION
634
+
635
+ .header__hamburger{
636
+
637
+ width: 520px;
638
+
639
+ height: 100vh;
640
+
641
+ background-color:rgba($color: $black, $alpha: 0.9);
642
+
643
+ position: absolute;
644
+
645
+ right: 0;
646
+
647
+ top: 0;
648
+
649
+ display: flex;
650
+
651
+ justify-content: center;
652
+
653
+ align-items: center;
654
+
655
+ transform: translateX(100%);
656
+
657
+ flex-direction: column;
658
+
659
+ transition: all 0.4s ease;
660
+
661
+ z-index: 0;
662
+
663
+ position: fixed;
664
+
665
+ img{
666
+
667
+ margin-bottom: 40px;
668
+
669
+ }
670
+
671
+ &--menu{
672
+
673
+ text-align: center;
674
+
675
+ li{
676
+
677
+ margin-bottom: 30px;
678
+
679
+ &:last-of-type{
680
+
681
+ margin-bottom: 0;
682
+
683
+ }
684
+
685
+ a{
686
+
687
+ color: $white;
688
+
689
+ font-size: 2rem;
690
+
691
+ line-height: 1;
692
+
693
+ font-weight: bold;
694
+
695
+ text-decoration: none;
696
+
697
+
698
+
699
+ }
700
+
701
+ }
702
+
703
+ }
704
+
705
+ &.open{
706
+
707
+ transition: all 0.4s ease;
708
+
709
+ transform: translateX(0);
710
+
711
+ }
712
+
713
+ }
714
+
715
+
716
+
717
+ //BACKGROUND
718
+
719
+ .background{
720
+
721
+ background: linear-gradient(180deg,$white 0%,$white 50%,$back 50%,$back 100%);
722
+
723
+ margin: 0 calc(50% - 50vw);
724
+
725
+ padding-bottom: 80px;
726
+
727
+ width: 100vw;
728
+
729
+ display: grid;
730
+
731
+ grid-template-areas:
732
+
733
+ "about about"
734
+
735
+ "works culture";
736
+
737
+
738
+
739
+
174
740
 
175
741
  ```
176
742
 
177
-
178
-
179
- ![イメージ説明](43f3d70a7979e968b5bbe4577143483f.png)
180
-
181
-
182
-
183
743
  ### 試したこと
184
744
 
185
745