質問編集履歴
3
クラス名修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -123,9 +123,10 @@
|
|
123
123
|
|
124
124
|
<div class="modal-wrapper">
|
125
125
|
<div class="modal">
|
126
|
+
<div class="close-btn">
|
127
|
+
<span class="fa fa-times"></span>
|
128
|
+
</div>
|
126
129
|
|
127
|
-
<span class="fa fa-times"></span>
|
128
|
-
|
129
130
|
<div class="sign-up">
|
130
131
|
<p>Emailで新規登録</p>
|
131
132
|
<form>
|
@@ -452,7 +453,7 @@
|
|
452
453
|
padding: 10px 10px 0 0;
|
453
454
|
}
|
454
455
|
|
455
|
-
.
|
456
|
+
.close-btn:hover {
|
456
457
|
cursor: pointer;
|
457
458
|
}
|
458
459
|
|
@@ -491,7 +492,7 @@
|
|
491
492
|
$('.modal-wrapper').fadeIn();
|
492
493
|
});
|
493
494
|
|
494
|
-
$('.
|
495
|
+
$('.close-btn').click(function (){
|
495
496
|
$('.modal-wrapper').fadeOut();
|
496
497
|
});
|
497
498
|
|
2
全コード追加しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,7 +1,31 @@
|
|
1
1
|
開いたモーダルを.close-btnで閉じたいのですが、反応しません。
|
2
2
|
|
3
3
|
```HTML
|
4
|
+
<!DOCTYPE html>
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<meta charset="utf-8">
|
8
|
+
<title>Progate</title>
|
9
|
+
<link rel="stylesheet" href="stylesheet.css">
|
10
|
+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
|
11
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
12
|
+
</head>
|
13
|
+
<body>
|
14
|
+
<div class="background-img">
|
15
|
+
<header>
|
16
|
+
<div class="container">
|
17
|
+
<div class="header-wrapper">
|
18
|
+
<div class="header-left">
|
19
|
+
<img src="https://prog-8.com/images/html/advanced/main_logo.png">
|
20
|
+
</div>
|
21
|
+
<div class="header-right">
|
22
|
+
<div class="login-btn"><a href="">ログイン</a></div>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</header>
|
27
|
+
|
4
|
-
<div class="top-wrapper">
|
28
|
+
<div class="top-wrapper">
|
5
29
|
<div class="container">
|
6
30
|
<h1>LEARN TO CODE.<br>
|
7
31
|
LEARN TO BE CREATIVE.</h1>
|
@@ -18,13 +42,90 @@
|
|
18
42
|
</div>
|
19
43
|
</div>
|
20
44
|
</div>
|
45
|
+
|
46
|
+
<div class="lesson-wrapper">
|
47
|
+
<div class="container">
|
48
|
+
<p class="start-lesson">Learn Where to Get Started!</p>
|
49
|
+
|
50
|
+
<div class="lessons">
|
51
|
+
<div class="lesson">
|
52
|
+
<div class="icon">
|
53
|
+
<img src="https://prog-8.com/images/html/advanced/html.png">
|
54
|
+
</div>
|
55
|
+
<h2>HTML&CSS</h2>
|
56
|
+
<div class="text-contents">
|
57
|
+
<p>ウェブページの作成に使用される言語です。HTMLとCSSを組み合わせることで、静的なページを作り上げることができます。</p>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
<div class="lesson">
|
61
|
+
<div class="icon">
|
62
|
+
<img src="https://prog-8.com/images/html/advanced/jQuery.png">
|
63
|
+
</div>
|
64
|
+
<h2>jQuery</h2>
|
65
|
+
<div class="text-contents">
|
66
|
+
<p>素敵な動きを手軽に実装できるJavaScriptライブラリです。 アニメーション効果をつけたり、Ajax(エイジャックス)を使って外部ファイルを読み込んだりと色々なことができます。</p>
|
67
|
+
</div>
|
68
|
+
</div>
|
69
|
+
<div class="lesson">
|
70
|
+
<div class="icon">
|
71
|
+
<img src="https://prog-8.com/images/html/advanced/ruby.png">
|
72
|
+
</div>
|
73
|
+
<h2>Ruby</h2>
|
74
|
+
<div class="text-contents">
|
75
|
+
<p>オープンソースの動的なプログラミング言語で、 シンプルさと高い生産性を備えています。大きなWebアプリケーションから小さな日用ツールまで、さまざまなソフトウェアを作ることができます。</p>
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
<div class="lesson">
|
79
|
+
<div class="icon">
|
80
|
+
<img src="https://prog-8.com/images/html/advanced/php.png">
|
81
|
+
</div>
|
82
|
+
<h2>PHP</h2>
|
83
|
+
<div class="text-contents">
|
84
|
+
<p>HTMLだけではページの内容を変えることはできません。PHPはHTMLにプログラムを埋め込み、それを可能にします。</p>
|
85
|
+
</div>
|
86
|
+
</div>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div class="faq-wrapper">
|
93
|
+
<div class="container">
|
94
|
+
<h3>FAQ</h3>
|
95
|
+
<div class="faq">
|
96
|
+
<ul>
|
97
|
+
<li class="faq-list">Progateのキャラクターはなんですか?<span>+</span>
|
98
|
+
<p class="answer">にんじゃわんこといいます。忍者の恰好をしたわんこです。ネコではありません。</p></li>
|
99
|
+
<li class="faq-list">にんじゃわんこメスですか?それともオスですか?<span>+</span>
|
100
|
+
<p class="answer">にんじゃわんこはオスです。</p></li>
|
101
|
+
<li class="faq-list">にんじゃわんこは何歳ですか?<span>+</span>
|
102
|
+
<p class="answer">にんじゃわんこは14歳です。</p></li>
|
103
|
+
</ul>
|
104
|
+
</div>
|
105
|
+
</div>
|
106
|
+
</div>
|
21
107
|
|
22
|
-
|
108
|
+
<div class="message-wrapper">
|
109
|
+
<div class="container">
|
110
|
+
<h4>さぁ、あなたもProgateでプログラミングを学んでみませんか?</h4>
|
111
|
+
<p>Let's learn to code, leran to be creative!</p>
|
112
|
+
<div class="btn start signup-btn">さっそく開発する</div>
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
|
116
|
+
|
117
|
+
<footer>
|
118
|
+
<div class="container">
|
119
|
+
<img src="https://prog-8.com/images/html/advanced/footer_logo.png">
|
120
|
+
<p>Learn to Code, Learn to be Creative.</p>
|
121
|
+
</div>
|
122
|
+
</footer>
|
123
|
+
|
23
|
-
|
124
|
+
<div class="modal-wrapper">
|
24
125
|
<div class="modal">
|
25
|
-
|
126
|
+
|
26
|
-
|
127
|
+
<span class="fa fa-times"></span>
|
27
|
-
|
128
|
+
|
28
129
|
<div class="sign-up">
|
29
130
|
<p>Emailで新規登録</p>
|
30
131
|
<form>
|
@@ -35,9 +136,79 @@
|
|
35
136
|
</div>
|
36
137
|
</div>
|
37
138
|
</div>
|
139
|
+
|
140
|
+
<script src="script.js"></script>
|
141
|
+
</body>
|
142
|
+
</html>
|
143
|
+
|
38
144
|
```
|
39
145
|
|
40
146
|
```CSS
|
147
|
+
|
148
|
+
body {
|
149
|
+
margin: 0;
|
150
|
+
}
|
151
|
+
|
152
|
+
a {
|
153
|
+
text-decoration: none;
|
154
|
+
}
|
155
|
+
|
156
|
+
li {
|
157
|
+
list-style: none;
|
158
|
+
}
|
159
|
+
|
160
|
+
p {
|
161
|
+
margin: 0;
|
162
|
+
}
|
163
|
+
|
164
|
+
.container {
|
165
|
+
max-width: 1000px;
|
166
|
+
margin:0 auto;
|
167
|
+
}
|
168
|
+
|
169
|
+
.background-img {
|
170
|
+
background-image:url("https://prog-8.com/images/html/advanced/top.png");
|
171
|
+
background-size: cover;
|
172
|
+
}
|
173
|
+
|
174
|
+
/*headerここから*/
|
175
|
+
|
176
|
+
header {
|
177
|
+
background: #253339;
|
178
|
+
opacity: 0.9;
|
179
|
+
position: fixed;
|
180
|
+
z-index: 1;
|
181
|
+
width: 100%;
|
182
|
+
}
|
183
|
+
|
184
|
+
.header-left {
|
185
|
+
height: 60px;
|
186
|
+
}
|
187
|
+
|
188
|
+
.header-right {
|
189
|
+
background: rgb(105,117,120);
|
190
|
+
line-height: 60px;
|
191
|
+
width: 100px;
|
192
|
+
text-align: center;
|
193
|
+
}
|
194
|
+
|
195
|
+
.header-wrapper {
|
196
|
+
display: flex;
|
197
|
+
justify-content: space-between;
|
198
|
+
}
|
199
|
+
|
200
|
+
.login-btn > a {
|
201
|
+
color: white;
|
202
|
+
display: block;
|
203
|
+
}
|
204
|
+
|
205
|
+
.header-left img {
|
206
|
+
width: 120px;
|
207
|
+
margin: 20px 0;
|
208
|
+
}
|
209
|
+
|
210
|
+
/*top-wrapperここから*/
|
211
|
+
|
41
212
|
.top-wrapper , h1 , p {
|
42
213
|
color: white;
|
43
214
|
opacity: 0.9;
|
@@ -47,6 +218,7 @@
|
|
47
218
|
letter-spacing: 5px;
|
48
219
|
font-size: 35px;
|
49
220
|
padding: 120px 0 30px 0;
|
221
|
+
margin-top: 0;
|
50
222
|
}
|
51
223
|
|
52
224
|
.top-wrapper , p {
|
@@ -98,6 +270,157 @@
|
|
98
270
|
}
|
99
271
|
|
100
272
|
|
273
|
+
/*lesson-wrapperここから*/
|
274
|
+
|
275
|
+
.start-lesson p {
|
276
|
+
color: #5F5D60;
|
277
|
+
}
|
278
|
+
|
279
|
+
.lesson-wrapper {
|
280
|
+
background: #F7F7F7;
|
281
|
+
height: 500px;
|
282
|
+
padding-bottom: 80px;
|
283
|
+
}
|
284
|
+
|
285
|
+
.lessons {
|
286
|
+
display: flex;
|
287
|
+
justify-content: space-between;
|
288
|
+
padding-bottom: 60px;
|
289
|
+
}
|
290
|
+
|
291
|
+
.lesson {
|
292
|
+
width: 25%;
|
293
|
+
text-align: center;
|
294
|
+
position: relative;
|
295
|
+
}
|
296
|
+
|
297
|
+
|
298
|
+
.text-contents {
|
299
|
+
width: 80%;
|
300
|
+
padding-top: 30px;
|
301
|
+
margin: 0 auto;
|
302
|
+
display: none;
|
303
|
+
}
|
304
|
+
|
305
|
+
.start-lesson {
|
306
|
+
font-size: 30px;
|
307
|
+
margin: 0 auto;
|
308
|
+
padding: 40px 0;
|
309
|
+
text-align: center;
|
310
|
+
letter-spacing: 1px;
|
311
|
+
}
|
312
|
+
|
313
|
+
.lesson-wrapper p {
|
314
|
+
color: #5F5D60;
|
315
|
+
}
|
316
|
+
|
317
|
+
h2 {
|
318
|
+
font-size: 16px;
|
319
|
+
font-weight: normal;
|
320
|
+
color: white;
|
321
|
+
width: 100%;
|
322
|
+
position: absolute;
|
323
|
+
top: 70px;
|
324
|
+
}
|
325
|
+
|
326
|
+
.faq-wrapper {
|
327
|
+
background: #E6ECF0;
|
328
|
+
text-align: center;
|
329
|
+
}
|
330
|
+
|
331
|
+
.faq-wrapper {
|
332
|
+
color: #5F5D60;
|
333
|
+
}
|
334
|
+
|
335
|
+
h3 {
|
336
|
+
font-size: 20px;
|
337
|
+
font-weight: normal;
|
338
|
+
margin-top: 0;
|
339
|
+
padding: 20px 0 40px 0;
|
340
|
+
}
|
341
|
+
|
342
|
+
.faq {
|
343
|
+
width: 650px;
|
344
|
+
margin: 0 auto;
|
345
|
+
padding-bottom: 30px;
|
346
|
+
}
|
347
|
+
|
348
|
+
li {
|
349
|
+
text-align: left;
|
350
|
+
}
|
351
|
+
|
352
|
+
span {
|
353
|
+
float: right;
|
354
|
+
color: #D4D6D8;
|
355
|
+
}
|
356
|
+
|
357
|
+
.faq-list {
|
358
|
+
font-size: 14px;
|
359
|
+
font-weight: bold;
|
360
|
+
padding: 20px 0;
|
361
|
+
border-bottom: 1px solid #D4D6D8;
|
362
|
+
}
|
363
|
+
|
364
|
+
.faq-list:hover {
|
365
|
+
cursor: pointer;
|
366
|
+
}
|
367
|
+
|
368
|
+
.answer {
|
369
|
+
color: #5F5D60;
|
370
|
+
font-size: 12px;
|
371
|
+
padding: 30px 0 10px 0;
|
372
|
+
display: none;
|
373
|
+
}
|
374
|
+
|
375
|
+
|
376
|
+
/*message.wrapperここから*/
|
377
|
+
|
378
|
+
.message-wrapper {
|
379
|
+
text-align: center;
|
380
|
+
padding-bottom: 30px;
|
381
|
+
}
|
382
|
+
|
383
|
+
h4 {
|
384
|
+
font-size: 20px;
|
385
|
+
font-weight: normal;
|
386
|
+
color: #5F5D60;
|
387
|
+
}
|
388
|
+
|
389
|
+
.message-wrapper p {
|
390
|
+
color: #5F5D60;
|
391
|
+
}
|
392
|
+
|
393
|
+
.start {
|
394
|
+
background: #5DCA88;
|
395
|
+
color: white;
|
396
|
+
margin: 30px 0;
|
397
|
+
padding: 10px 20px;
|
398
|
+
box-shadow: 0 5px 0 rgb(26,121,64);
|
399
|
+
}
|
400
|
+
|
401
|
+
.start:active {
|
402
|
+
position: relative;
|
403
|
+
top: 5px;
|
404
|
+
box-shadow: none;
|
405
|
+
}
|
406
|
+
|
407
|
+
/*footerここから*/
|
408
|
+
|
409
|
+
footer {
|
410
|
+
padding: 30px 0;
|
411
|
+
border-top: 1px solid #D4D6D8;
|
412
|
+
}
|
413
|
+
|
414
|
+
footer p {
|
415
|
+
color: #B3AEB5;
|
416
|
+
}
|
417
|
+
|
418
|
+
footer img {
|
419
|
+
width: 140px;
|
420
|
+
}
|
421
|
+
|
422
|
+
/*modalここから*/
|
423
|
+
|
101
424
|
.modal-wrapper {
|
102
425
|
background: rgba(0, 0, 0, 0.6);
|
103
426
|
position: fixed;
|
@@ -123,19 +446,13 @@
|
|
123
446
|
text-align: center;
|
124
447
|
}
|
125
448
|
|
126
|
-
.close-btn {
|
127
|
-
width: 30px;
|
128
|
-
height: 30px;
|
129
|
-
float: right;
|
130
|
-
background: pink;
|
131
|
-
}
|
132
449
|
|
133
450
|
.fa {
|
134
451
|
font-size: 15px;
|
135
452
|
padding: 10px 10px 0 0;
|
136
453
|
}
|
137
454
|
|
138
|
-
.
|
455
|
+
.fa:hover {
|
139
456
|
cursor: pointer;
|
140
457
|
}
|
141
458
|
|
@@ -167,15 +484,46 @@
|
|
167
484
|
```
|
168
485
|
|
169
486
|
```jQuery
|
487
|
+
|
170
488
|
$(function() {
|
171
489
|
|
172
490
|
$('.signup-btn').click(function (){
|
173
491
|
$('.modal-wrapper').fadeIn();
|
174
492
|
});
|
175
493
|
|
176
|
-
$('.
|
494
|
+
$('.fa').click(function (){
|
177
495
|
$('.modal-wrapper').fadeOut();
|
178
496
|
});
|
179
497
|
|
498
|
+
|
499
|
+
$('.lesson').hover(
|
500
|
+
function (){
|
501
|
+
$(this).find('.text-contents').fadeIn();
|
502
|
+
} ,
|
503
|
+
function(){
|
504
|
+
$(this).find('.text-contents').fadeOut();
|
505
|
+
});
|
506
|
+
|
507
|
+
|
508
|
+
$('.faq-list').click(function (){
|
509
|
+
var $answer = $(this).find('.answer')
|
510
|
+
|
511
|
+
if ($answer.hasClass('open')) {
|
512
|
+
$answer.removeClass('open');
|
513
|
+
$answer.slideUp();
|
514
|
+
$(this).find('span').text('+');
|
515
|
+
|
516
|
+
} else {
|
517
|
+
$answer.addClass('open')
|
518
|
+
$answer.slideDown();
|
519
|
+
$(this).find('span').text('-');
|
520
|
+
};
|
521
|
+
|
522
|
+
|
180
523
|
});
|
524
|
+
|
525
|
+
|
526
|
+
|
527
|
+
});
|
528
|
+
|
181
529
|
```
|
1
モーダルを開くソースコードを追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,25 @@
|
|
1
1
|
開いたモーダルを.close-btnで閉じたいのですが、反応しません。
|
2
2
|
|
3
3
|
```HTML
|
4
|
+
<div class="top-wrapper">
|
5
|
+
<div class="container">
|
6
|
+
<h1>LEARN TO CODE.<br>
|
7
|
+
LEARN TO BE CREATIVE.</h1>
|
8
|
+
<p>progateはオンラインプログラミング学習サービスです。<br>
|
9
|
+
初心者にもやさしいスライドとレッスンで、ウェブサービスを作りながらプログラミングを学んでいきましょう。</p>
|
10
|
+
<div class="btn-wrapper">
|
11
|
+
<div class="btn new signup-btn">新規登録はこちら</div>
|
12
|
+
<p>or</p>
|
13
|
+
<ul class="ft-btn-wrapper">
|
14
|
+
<li class="btn facebook">Facebookで登録</li>
|
15
|
+
<li class="btn twitter">Twitterで登録</li>
|
16
|
+
</ul>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
|
4
23
|
<div class="modal-wrapper">
|
5
24
|
<div class="modal">
|
6
25
|
<div class="close-btn">
|
@@ -19,6 +38,66 @@
|
|
19
38
|
```
|
20
39
|
|
21
40
|
```CSS
|
41
|
+
.top-wrapper , h1 , p {
|
42
|
+
color: white;
|
43
|
+
opacity: 0.9;
|
44
|
+
}
|
45
|
+
|
46
|
+
.top-wrapper h1 {
|
47
|
+
letter-spacing: 5px;
|
48
|
+
font-size: 35px;
|
49
|
+
padding: 120px 0 30px 0;
|
50
|
+
}
|
51
|
+
|
52
|
+
.top-wrapper , p {
|
53
|
+
font-size: 14px;
|
54
|
+
}
|
55
|
+
|
56
|
+
.top-wrapper {
|
57
|
+
text-align: center;
|
58
|
+
}
|
59
|
+
|
60
|
+
.btn-wrapper {
|
61
|
+
padding: 30px 0 100px 0;
|
62
|
+
}
|
63
|
+
|
64
|
+
.ft-btn-wrapper {
|
65
|
+
padding-left: 0;
|
66
|
+
padding-right: 20px;
|
67
|
+
}
|
68
|
+
|
69
|
+
.ft-btn-wrapper li {
|
70
|
+
display: inline-block;
|
71
|
+
}
|
72
|
+
|
73
|
+
.btn {
|
74
|
+
background: pink;
|
75
|
+
padding: 0 15px;
|
76
|
+
line-height: 35px;
|
77
|
+
border-radius: 5px;
|
78
|
+
opacity: 0.7;
|
79
|
+
display: inline-block;
|
80
|
+
}
|
81
|
+
|
82
|
+
.btn:hover {
|
83
|
+
opacity: 1.0;
|
84
|
+
cursor: pointer;
|
85
|
+
}
|
86
|
+
|
87
|
+
|
88
|
+
.twitter {
|
89
|
+
margin-left: 15px;
|
90
|
+
background: #00bfff;
|
91
|
+
}
|
92
|
+
|
93
|
+
.facebook {
|
94
|
+
background: #4169e1;
|
95
|
+
}
|
96
|
+
.new {
|
97
|
+
background:#3cb371;
|
98
|
+
}
|
99
|
+
|
100
|
+
|
22
101
|
.modal-wrapper {
|
23
102
|
background: rgba(0, 0, 0, 0.6);
|
24
103
|
position: fixed;
|