質問編集履歴

3

クラス名修正

2020/05/16 07:11

投稿

dorachan1293
dorachan1293

スコア11

test CHANGED
File without changes
test CHANGED
@@ -248,12 +248,14 @@
248
248
 
249
249
  <div class="modal">
250
250
 
251
+ <div class="close-btn">
252
+
253
+ <span class="fa fa-times"></span>
254
+
255
+ </div>
256
+
251
257
 
252
258
 
253
- <span class="fa fa-times"></span>
254
-
255
-
256
-
257
259
  <div class="sign-up">
258
260
 
259
261
  <p>Emailで新規登録</p>
@@ -906,7 +908,7 @@
906
908
 
907
909
 
908
910
 
909
- .fa:hover {
911
+ .close-btn:hover {
910
912
 
911
913
  cursor: pointer;
912
914
 
@@ -984,7 +986,7 @@
984
986
 
985
987
 
986
988
 
987
- $('.fa').click(function (){
989
+ $('.close-btn').click(function (){
988
990
 
989
991
  $('.modal-wrapper').fadeOut();
990
992
 

2

全コード追加しました

2020/05/16 07:11

投稿

dorachan1293
dorachan1293

スコア11

test CHANGED
File without changes
test CHANGED
@@ -4,7 +4,55 @@
4
4
 
5
5
  ```HTML
6
6
 
7
+ <!DOCTYPE html>
8
+
9
+ <html>
10
+
11
+ <head>
12
+
13
+ <meta charset="utf-8">
14
+
15
+ <title>Progate</title>
16
+
17
+ <link rel="stylesheet" href="stylesheet.css">
18
+
19
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
20
+
21
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
22
+
23
+ </head>
24
+
25
+ <body>
26
+
27
+ <div class="background-img">
28
+
29
+ <header>
30
+
31
+ <div class="container">
32
+
33
+ <div class="header-wrapper">
34
+
35
+ <div class="header-left">
36
+
37
+ <img src="https://prog-8.com/images/html/advanced/main_logo.png">
38
+
39
+ </div>
40
+
41
+ <div class="header-right">
42
+
43
+ <div class="login-btn"><a href="">ログイン</a></div>
44
+
45
+ </div>
46
+
47
+ </div>
48
+
49
+ </div>
50
+
51
+ </header>
52
+
53
+
54
+
7
- <div class="top-wrapper">
55
+ <div class="top-wrapper">
8
56
 
9
57
  <div class="container">
10
58
 
@@ -38,46 +86,340 @@
38
86
 
39
87
  </div>
40
88
 
89
+
90
+
41
-
91
+ <div class="lesson-wrapper">
92
+
42
-
93
+ <div class="container">
94
+
43
-
95
+ <p class="start-lesson">Learn Where to Get Started!</p>
96
+
97
+
98
+
44
-
99
+ <div class="lessons">
100
+
101
+ <div class="lesson">
102
+
103
+ <div class="icon">
104
+
105
+ <img src="https://prog-8.com/images/html/advanced/html.png">
106
+
107
+ </div>
108
+
109
+ <h2>HTML&amp;CSS</h2>
110
+
111
+ <div class="text-contents">
112
+
113
+ <p>ウェブページの作成に使用される言語です。HTMLとCSSを組み合わせることで、静的なページを作り上げることができます。</p>
114
+
115
+ </div>
116
+
117
+ </div>
118
+
119
+ <div class="lesson">
120
+
121
+ <div class="icon">
122
+
123
+ <img src="https://prog-8.com/images/html/advanced/jQuery.png">
124
+
125
+ </div>
126
+
127
+ <h2>jQuery</h2>
128
+
129
+ <div class="text-contents">
130
+
131
+ <p>素敵な動きを手軽に実装できるJavaScriptライブラリです。 アニメーション効果をつけたり、Ajax(エイジャックス)を使って外部ファイルを読み込んだりと色々なことができます。</p>
132
+
133
+ </div>
134
+
135
+ </div>
136
+
137
+ <div class="lesson">
138
+
139
+ <div class="icon">
140
+
141
+ <img src="https://prog-8.com/images/html/advanced/ruby.png">
142
+
143
+ </div>
144
+
145
+ <h2>Ruby</h2>
146
+
147
+ <div class="text-contents">
148
+
149
+ <p>オープンソースの動的なプログラミング言語で、 シンプルさと高い生産性を備えています。大きなWebアプリケーションから小さな日用ツールまで、さまざまなソフトウェアを作ることができます。</p>
150
+
151
+ </div>
152
+
153
+ </div>
154
+
155
+ <div class="lesson">
156
+
157
+ <div class="icon">
158
+
159
+ <img src="https://prog-8.com/images/html/advanced/php.png">
160
+
161
+ </div>
162
+
163
+ <h2>PHP</h2>
164
+
165
+ <div class="text-contents">
166
+
167
+ <p>HTMLだけではページの内容を変えることはできません。PHPはHTMLにプログラムを埋め込み、それを可能にします。</p>
168
+
169
+ </div>
170
+
171
+ </div>
172
+
173
+ </div>
174
+
175
+
176
+
177
+ </div>
178
+
179
+ </div>
180
+
181
+
182
+
183
+ <div class="faq-wrapper">
184
+
185
+ <div class="container">
186
+
187
+ <h3>FAQ</h3>
188
+
189
+ <div class="faq">
190
+
191
+ <ul>
192
+
193
+ <li class="faq-list">Progateのキャラクターはなんですか?<span>+</span>
194
+
195
+ <p class="answer">にんじゃわんこといいます。忍者の恰好をしたわんこです。ネコではありません。</p></li>
196
+
197
+ <li class="faq-list">にんじゃわんこメスですか?それともオスですか?<span>+</span>
198
+
199
+ <p class="answer">にんじゃわんこはオスです。</p></li>
200
+
201
+ <li class="faq-list">にんじゃわんこは何歳ですか?<span>+</span>
202
+
203
+ <p class="answer">にんじゃわんこは14歳です。</p></li>
204
+
205
+ </ul>
206
+
207
+ </div>
208
+
209
+ </div>
210
+
211
+ </div>
212
+
213
+
214
+
215
+ <div class="message-wrapper">
216
+
217
+ <div class="container">
218
+
219
+ <h4>さぁ、あなたもProgateでプログラミングを学んでみませんか?</h4>
220
+
221
+ <p>Let's learn to code, leran to be creative!</p>
222
+
223
+ <div class="btn start signup-btn">さっそく開発する</div>
224
+
225
+ </div>
226
+
227
+ </div>
228
+
229
+
230
+
231
+
232
+
233
+ <footer>
234
+
235
+ <div class="container">
236
+
237
+ <img src="https://prog-8.com/images/html/advanced/footer_logo.png">
238
+
239
+ <p>Learn to Code, Learn to be Creative.</p>
240
+
241
+ </div>
242
+
243
+ </footer>
244
+
245
+
246
+
45
- <div class="modal-wrapper">
247
+ <div class="modal-wrapper">
46
248
 
47
249
  <div class="modal">
48
250
 
49
- <div class="close-btn">
251
+
50
-
252
+
51
- <span class="fa fa-times"></span>
253
+ <span class="fa fa-times"></span>
254
+
255
+
256
+
257
+ <div class="sign-up">
258
+
259
+ <p>Emailで新規登録</p>
260
+
261
+ <form>
262
+
263
+ <input type="text" placeholder="メールアドレス">
264
+
265
+ <input type="text" placeholder="パスワード">
266
+
267
+ <input class="submit" type="submit" value="新規登録">
268
+
269
+ </form>
52
270
 
53
271
  </div>
54
272
 
55
- <div class="sign-up">
56
-
57
- <p>Emailで新規登録</p>
58
-
59
- <form>
60
-
61
- <input type="text" placeholder="メールアドレス">
62
-
63
- <input type="text" placeholder="パスワード">
64
-
65
- <input class="submit" type="submit" value="新規登録">
66
-
67
- </form>
68
-
69
- </div>
70
-
71
273
  </div>
72
274
 
73
275
  </div>
74
276
 
277
+
278
+
279
+ <script src="script.js"></script>
280
+
281
+ </body>
282
+
283
+ </html>
284
+
285
+
286
+
75
287
  ```
76
288
 
77
289
 
78
290
 
79
291
  ```CSS
80
292
 
293
+
294
+
295
+ body {
296
+
297
+ margin: 0;
298
+
299
+ }
300
+
301
+
302
+
303
+ a {
304
+
305
+ text-decoration: none;
306
+
307
+ }
308
+
309
+
310
+
311
+ li {
312
+
313
+ list-style: none;
314
+
315
+ }
316
+
317
+
318
+
319
+ p {
320
+
321
+ margin: 0;
322
+
323
+ }
324
+
325
+
326
+
327
+ .container {
328
+
329
+ max-width: 1000px;
330
+
331
+ margin:0 auto;
332
+
333
+ }
334
+
335
+
336
+
337
+ .background-img {
338
+
339
+ background-image:url("https://prog-8.com/images/html/advanced/top.png");
340
+
341
+ background-size: cover;
342
+
343
+ }
344
+
345
+
346
+
347
+ /*headerここから*/
348
+
349
+
350
+
351
+ header {
352
+
353
+ background: #253339;
354
+
355
+ opacity: 0.9;
356
+
357
+ position: fixed;
358
+
359
+ z-index: 1;
360
+
361
+ width: 100%;
362
+
363
+ }
364
+
365
+
366
+
367
+ .header-left {
368
+
369
+ height: 60px;
370
+
371
+ }
372
+
373
+
374
+
375
+ .header-right {
376
+
377
+ background: rgb(105,117,120);
378
+
379
+ line-height: 60px;
380
+
381
+ width: 100px;
382
+
383
+ text-align: center;
384
+
385
+ }
386
+
387
+
388
+
389
+ .header-wrapper {
390
+
391
+ display: flex;
392
+
393
+ justify-content: space-between;
394
+
395
+ }
396
+
397
+
398
+
399
+ .login-btn > a {
400
+
401
+ color: white;
402
+
403
+ display: block;
404
+
405
+ }
406
+
407
+
408
+
409
+ .header-left img {
410
+
411
+ width: 120px;
412
+
413
+ margin: 20px 0;
414
+
415
+ }
416
+
417
+
418
+
419
+ /*top-wrapperここから*/
420
+
421
+
422
+
81
423
  .top-wrapper , h1 , p {
82
424
 
83
425
  color: white;
@@ -96,6 +438,8 @@
96
438
 
97
439
  padding: 120px 0 30px 0;
98
440
 
441
+ margin-top: 0;
442
+
99
443
  }
100
444
 
101
445
 
@@ -198,6 +542,308 @@
198
542
 
199
543
 
200
544
 
545
+ /*lesson-wrapperここから*/
546
+
547
+
548
+
549
+ .start-lesson p {
550
+
551
+ color: #5F5D60;
552
+
553
+ }
554
+
555
+
556
+
557
+ .lesson-wrapper {
558
+
559
+ background: #F7F7F7;
560
+
561
+ height: 500px;
562
+
563
+ padding-bottom: 80px;
564
+
565
+ }
566
+
567
+
568
+
569
+ .lessons {
570
+
571
+ display: flex;
572
+
573
+ justify-content: space-between;
574
+
575
+ padding-bottom: 60px;
576
+
577
+ }
578
+
579
+
580
+
581
+ .lesson {
582
+
583
+ width: 25%;
584
+
585
+ text-align: center;
586
+
587
+ position: relative;
588
+
589
+ }
590
+
591
+
592
+
593
+
594
+
595
+ .text-contents {
596
+
597
+ width: 80%;
598
+
599
+ padding-top: 30px;
600
+
601
+ margin: 0 auto;
602
+
603
+ display: none;
604
+
605
+ }
606
+
607
+
608
+
609
+ .start-lesson {
610
+
611
+ font-size: 30px;
612
+
613
+ margin: 0 auto;
614
+
615
+ padding: 40px 0;
616
+
617
+ text-align: center;
618
+
619
+ letter-spacing: 1px;
620
+
621
+ }
622
+
623
+
624
+
625
+ .lesson-wrapper p {
626
+
627
+ color: #5F5D60;
628
+
629
+ }
630
+
631
+
632
+
633
+ h2 {
634
+
635
+ font-size: 16px;
636
+
637
+ font-weight: normal;
638
+
639
+ color: white;
640
+
641
+ width: 100%;
642
+
643
+ position: absolute;
644
+
645
+ top: 70px;
646
+
647
+ }
648
+
649
+
650
+
651
+ .faq-wrapper {
652
+
653
+ background: #E6ECF0;
654
+
655
+ text-align: center;
656
+
657
+ }
658
+
659
+
660
+
661
+ .faq-wrapper {
662
+
663
+ color: #5F5D60;
664
+
665
+ }
666
+
667
+
668
+
669
+ h3 {
670
+
671
+ font-size: 20px;
672
+
673
+ font-weight: normal;
674
+
675
+ margin-top: 0;
676
+
677
+ padding: 20px 0 40px 0;
678
+
679
+ }
680
+
681
+
682
+
683
+ .faq {
684
+
685
+ width: 650px;
686
+
687
+ margin: 0 auto;
688
+
689
+ padding-bottom: 30px;
690
+
691
+ }
692
+
693
+
694
+
695
+ li {
696
+
697
+ text-align: left;
698
+
699
+ }
700
+
701
+
702
+
703
+ span {
704
+
705
+ float: right;
706
+
707
+ color: #D4D6D8;
708
+
709
+ }
710
+
711
+
712
+
713
+ .faq-list {
714
+
715
+ font-size: 14px;
716
+
717
+ font-weight: bold;
718
+
719
+ padding: 20px 0;
720
+
721
+ border-bottom: 1px solid #D4D6D8;
722
+
723
+ }
724
+
725
+
726
+
727
+ .faq-list:hover {
728
+
729
+ cursor: pointer;
730
+
731
+ }
732
+
733
+
734
+
735
+ .answer {
736
+
737
+ color: #5F5D60;
738
+
739
+ font-size: 12px;
740
+
741
+ padding: 30px 0 10px 0;
742
+
743
+ display: none;
744
+
745
+ }
746
+
747
+
748
+
749
+
750
+
751
+ /*message.wrapperここから*/
752
+
753
+
754
+
755
+ .message-wrapper {
756
+
757
+ text-align: center;
758
+
759
+ padding-bottom: 30px;
760
+
761
+ }
762
+
763
+
764
+
765
+ h4 {
766
+
767
+ font-size: 20px;
768
+
769
+ font-weight: normal;
770
+
771
+ color: #5F5D60;
772
+
773
+ }
774
+
775
+
776
+
777
+ .message-wrapper p {
778
+
779
+ color: #5F5D60;
780
+
781
+ }
782
+
783
+
784
+
785
+ .start {
786
+
787
+ background: #5DCA88;
788
+
789
+ color: white;
790
+
791
+ margin: 30px 0;
792
+
793
+ padding: 10px 20px;
794
+
795
+ box-shadow: 0 5px 0 rgb(26,121,64);
796
+
797
+ }
798
+
799
+
800
+
801
+ .start:active {
802
+
803
+ position: relative;
804
+
805
+ top: 5px;
806
+
807
+ box-shadow: none;
808
+
809
+ }
810
+
811
+
812
+
813
+ /*footerここから*/
814
+
815
+
816
+
817
+ footer {
818
+
819
+ padding: 30px 0;
820
+
821
+ border-top: 1px solid #D4D6D8;
822
+
823
+ }
824
+
825
+
826
+
827
+ footer p {
828
+
829
+ color: #B3AEB5;
830
+
831
+ }
832
+
833
+
834
+
835
+ footer img {
836
+
837
+ width: 140px;
838
+
839
+ }
840
+
841
+
842
+
843
+ /*modalここから*/
844
+
845
+
846
+
201
847
  .modal-wrapper {
202
848
 
203
849
  background: rgba(0, 0, 0, 0.6);
@@ -248,18 +894,6 @@
248
894
 
249
895
 
250
896
 
251
- .close-btn {
252
-
253
- width: 30px;
254
-
255
- height: 30px;
256
-
257
- float: right;
258
-
259
- background: pink;
260
-
261
- }
262
-
263
897
 
264
898
 
265
899
  .fa {
@@ -272,7 +906,7 @@
272
906
 
273
907
 
274
908
 
275
- .close-btn:hover {
909
+ .fa:hover {
276
910
 
277
911
  cursor: pointer;
278
912
 
@@ -336,6 +970,8 @@
336
970
 
337
971
  ```jQuery
338
972
 
973
+
974
+
339
975
  $(function() {
340
976
 
341
977
 
@@ -348,7 +984,7 @@
348
984
 
349
985
 
350
986
 
351
- $('.close-btn').click(function (){
987
+ $('.fa').click(function (){
352
988
 
353
989
  $('.modal-wrapper').fadeOut();
354
990
 
@@ -356,6 +992,66 @@
356
992
 
357
993
 
358
994
 
995
+
996
+
997
+ $('.lesson').hover(
998
+
999
+ function (){
1000
+
1001
+ $(this).find('.text-contents').fadeIn();
1002
+
1003
+ } ,
1004
+
1005
+ function(){
1006
+
1007
+ $(this).find('.text-contents').fadeOut();
1008
+
1009
+ });
1010
+
1011
+
1012
+
1013
+
1014
+
1015
+ $('.faq-list').click(function (){
1016
+
1017
+ var $answer = $(this).find('.answer')
1018
+
1019
+
1020
+
1021
+ if ($answer.hasClass('open')) {
1022
+
1023
+ $answer.removeClass('open');
1024
+
1025
+ $answer.slideUp();
1026
+
1027
+ $(this).find('span').text('+');
1028
+
1029
+
1030
+
1031
+ } else {
1032
+
1033
+ $answer.addClass('open')
1034
+
1035
+ $answer.slideDown();
1036
+
1037
+ $(this).find('span').text('-');
1038
+
1039
+ };
1040
+
1041
+
1042
+
1043
+
1044
+
359
1045
  });
360
1046
 
1047
+
1048
+
1049
+
1050
+
1051
+
1052
+
1053
+ });
1054
+
1055
+
1056
+
361
1057
  ```

1

モーダルを開くソースコードを追記

2020/05/16 02:23

投稿

dorachan1293
dorachan1293

スコア11

test CHANGED
File without changes
test CHANGED
@@ -4,6 +4,44 @@
4
4
 
5
5
  ```HTML
6
6
 
7
+ <div class="top-wrapper">
8
+
9
+ <div class="container">
10
+
11
+ <h1>LEARN TO CODE.<br>
12
+
13
+ LEARN TO BE CREATIVE.</h1>
14
+
15
+ <p>progateはオンラインプログラミング学習サービスです。<br>
16
+
17
+ 初心者にもやさしいスライドとレッスンで、ウェブサービスを作りながらプログラミングを学んでいきましょう。</p>
18
+
19
+ <div class="btn-wrapper">
20
+
21
+ <div class="btn new signup-btn">新規登録はこちら</div>
22
+
23
+ <p>or</p>
24
+
25
+ <ul class="ft-btn-wrapper">
26
+
27
+ <li class="btn facebook">Facebookで登録</li>
28
+
29
+ <li class="btn twitter">Twitterで登録</li>
30
+
31
+ </ul>
32
+
33
+ </div>
34
+
35
+ </div>
36
+
37
+ </div>
38
+
39
+ </div>
40
+
41
+
42
+
43
+
44
+
7
45
  <div class="modal-wrapper">
8
46
 
9
47
  <div class="modal">
@@ -40,6 +78,126 @@
40
78
 
41
79
  ```CSS
42
80
 
81
+ .top-wrapper , h1 , p {
82
+
83
+ color: white;
84
+
85
+ opacity: 0.9;
86
+
87
+ }
88
+
89
+
90
+
91
+ .top-wrapper h1 {
92
+
93
+ letter-spacing: 5px;
94
+
95
+ font-size: 35px;
96
+
97
+ padding: 120px 0 30px 0;
98
+
99
+ }
100
+
101
+
102
+
103
+ .top-wrapper , p {
104
+
105
+ font-size: 14px;
106
+
107
+ }
108
+
109
+
110
+
111
+ .top-wrapper {
112
+
113
+ text-align: center;
114
+
115
+ }
116
+
117
+
118
+
119
+ .btn-wrapper {
120
+
121
+ padding: 30px 0 100px 0;
122
+
123
+ }
124
+
125
+
126
+
127
+ .ft-btn-wrapper {
128
+
129
+ padding-left: 0;
130
+
131
+ padding-right: 20px;
132
+
133
+ }
134
+
135
+
136
+
137
+ .ft-btn-wrapper li {
138
+
139
+ display: inline-block;
140
+
141
+ }
142
+
143
+
144
+
145
+ .btn {
146
+
147
+ background: pink;
148
+
149
+ padding: 0 15px;
150
+
151
+ line-height: 35px;
152
+
153
+ border-radius: 5px;
154
+
155
+ opacity: 0.7;
156
+
157
+ display: inline-block;
158
+
159
+ }
160
+
161
+
162
+
163
+ .btn:hover {
164
+
165
+ opacity: 1.0;
166
+
167
+ cursor: pointer;
168
+
169
+ }
170
+
171
+
172
+
173
+
174
+
175
+ .twitter {
176
+
177
+ margin-left: 15px;
178
+
179
+ background: #00bfff;
180
+
181
+ }
182
+
183
+
184
+
185
+ .facebook {
186
+
187
+ background: #4169e1;
188
+
189
+ }
190
+
191
+ .new {
192
+
193
+ background:#3cb371;
194
+
195
+ }
196
+
197
+
198
+
199
+
200
+
43
201
  .modal-wrapper {
44
202
 
45
203
  background: rgba(0, 0, 0, 0.6);