質問編集履歴
3
ご指摘をいただき、発生している問題・エラーメッセージのコードブロックを外しました。無事画像表示ができました。ありがとうございます。また、CSSの冒頭に自分のスタイルガイドを消去しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -26,406 +26,350 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
+
![イメージ説明](9eb14e62c98272a7cd7567888b249491.png)
|
30
|
+
|
31
|
+
こちらのオレンジ色の部分がブラウザに起因するmargin(上下93.8px)だと思われます。
|
32
|
+
|
33
|
+
下のh2タグ内「プログラミングへようこそ」もそれぞれ上下のmarginを含んでいました。
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
### 該当のソースコード
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
```HTML
|
42
|
+
|
43
|
+
<!DOCTYPE html>
|
44
|
+
|
45
|
+
<!-- saved from url=(0022)http://127.0.0.1:5500/ -->
|
46
|
+
|
47
|
+
<html lang="ja">
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
<head>
|
52
|
+
|
53
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
58
|
+
|
59
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
<title>Progate初級道場編</title>
|
64
|
+
|
65
|
+
<link rel="stylesheet" href="./index_files/style.css">
|
66
|
+
|
67
|
+
</head>
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
<body>
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
<header>
|
78
|
+
|
79
|
+
<div class="header-logo">Progate</div>
|
80
|
+
|
81
|
+
<div class="header-list">
|
82
|
+
|
83
|
+
<ul>
|
84
|
+
|
85
|
+
<li>プログラミングとは</li>
|
86
|
+
|
87
|
+
<li>学べるレッスン</li>
|
88
|
+
|
89
|
+
<li>お問い合わせ</li>
|
90
|
+
|
91
|
+
</ul>
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
</header>
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
<main>
|
102
|
+
|
103
|
+
<div class="copy-container">
|
104
|
+
|
105
|
+
<h1>HELLO WORLD<span>.</span></h1>
|
106
|
+
|
107
|
+
<h2>プログラミングの世界へようこそ</h2>
|
108
|
+
|
109
|
+
<div class="contents">
|
110
|
+
|
111
|
+
<h3 class="section-title">学べるレッスン</h3>
|
112
|
+
|
113
|
+
<div class="contents-item"><img src="./index_files/html.svg">
|
114
|
+
|
115
|
+
<h3>HTML</h3>
|
116
|
+
|
117
|
+
<p>HTMLは~・・・・・・・</p>
|
118
|
+
|
119
|
+
</div>
|
120
|
+
|
121
|
+
<div class="contents-item"><img src="./index_files/php.svg">
|
122
|
+
|
123
|
+
<h3>CSS</h3>
|
124
|
+
|
125
|
+
<p>CSSは~・・・・・・・</p>
|
126
|
+
|
127
|
+
</div>
|
128
|
+
|
129
|
+
<div class="contents-item"><img src="./index_files/ruby.svg">
|
130
|
+
|
131
|
+
<h3>PHP</h3>
|
132
|
+
|
133
|
+
<p>PHPは~・・・・・・・</p>
|
134
|
+
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<div class="contents-item"><img src="./index_files/swift.svg">
|
138
|
+
|
139
|
+
<h3>Ruby</h3>
|
140
|
+
|
141
|
+
<p>Rubyは~・・・・・・・</p>
|
142
|
+
|
143
|
+
</div>
|
144
|
+
|
145
|
+
</div>
|
146
|
+
|
147
|
+
</div>
|
148
|
+
|
149
|
+
<div class="contact-form">
|
150
|
+
|
151
|
+
<h3 class="section-title">お問い合わせ</h3>
|
152
|
+
|
153
|
+
<p>メールアドレス</p>
|
154
|
+
|
155
|
+
<input>
|
156
|
+
|
157
|
+
<p>お問い合わせ内容</p>
|
158
|
+
|
159
|
+
<textarea></textarea>
|
160
|
+
|
161
|
+
<input type="button" value="送信">
|
162
|
+
|
163
|
+
</div>
|
164
|
+
|
165
|
+
</main>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<footer>
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
<div class="footer-logo">Progate</div>
|
176
|
+
|
177
|
+
<div class="footer-list">
|
178
|
+
|
179
|
+
<ul>
|
180
|
+
|
181
|
+
<li>会社概要</li>
|
182
|
+
|
183
|
+
<li>採用</li>
|
184
|
+
|
185
|
+
<li>お問い合わせ</li>
|
186
|
+
|
187
|
+
</ul>
|
188
|
+
|
189
|
+
</div>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
</footer>
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
<!-- Code injected by live-server -->
|
200
|
+
|
201
|
+
<script type="text/javascript">
|
202
|
+
|
203
|
+
// <![CDATA[ <-- For SVG support
|
204
|
+
|
205
|
+
if ('WebSocket' in window) {
|
206
|
+
|
207
|
+
(function () {
|
208
|
+
|
209
|
+
function refreshCSS() {
|
210
|
+
|
211
|
+
var sheets = [].slice.call(document.getElementsByTagName("link"));
|
212
|
+
|
213
|
+
var head = document.getElementsByTagName("head")[0];
|
214
|
+
|
215
|
+
for (var i = 0; i < sheets.length; ++i) {
|
216
|
+
|
217
|
+
var elem = sheets[i];
|
218
|
+
|
219
|
+
var parent = elem.parentElement || head;
|
220
|
+
|
221
|
+
parent.removeChild(elem);
|
222
|
+
|
223
|
+
var rel = elem.rel;
|
224
|
+
|
225
|
+
if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") {
|
226
|
+
|
227
|
+
var url = elem.href.replace(/(&|?)_cacheOverride=\d+/, '');
|
228
|
+
|
229
|
+
elem.href = url + (url.indexOf('?') >= 0 ? '&' : '?') + '_cacheOverride=' + (new Date().valueOf());
|
230
|
+
|
231
|
+
}
|
232
|
+
|
233
|
+
parent.appendChild(elem);
|
234
|
+
|
235
|
+
}
|
236
|
+
|
237
|
+
}
|
238
|
+
|
239
|
+
var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://';
|
240
|
+
|
241
|
+
var address = protocol + window.location.host + window.location.pathname + '/ws';
|
242
|
+
|
243
|
+
var socket = new WebSocket(address);
|
244
|
+
|
245
|
+
socket.onmessage = function (msg) {
|
246
|
+
|
247
|
+
if (msg.data == 'reload') window.location.reload();
|
248
|
+
|
249
|
+
else if (msg.data == 'refreshcss') refreshCSS();
|
250
|
+
|
251
|
+
};
|
252
|
+
|
253
|
+
if (sessionStorage && !sessionStorage.getItem('IsThisFirstTime_Log_From_LiveServer')) {
|
254
|
+
|
255
|
+
console.log('Live reload enabled.');
|
256
|
+
|
257
|
+
sessionStorage.setItem('IsThisFirstTime_Log_From_LiveServer', true);
|
258
|
+
|
259
|
+
}
|
260
|
+
|
261
|
+
})();
|
262
|
+
|
263
|
+
}
|
264
|
+
|
265
|
+
else {
|
266
|
+
|
267
|
+
console.error('Upgrade your browser. This Browser is NOT supported WebSocket for Live-Reloading.');
|
268
|
+
|
269
|
+
}
|
270
|
+
|
271
|
+
// ]]>
|
272
|
+
|
273
|
+
</script>
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
</body>
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
</html>
|
282
|
+
|
29
283
|
```
|
30
284
|
|
285
|
+
```CSS
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
/*---ヘッダー部分---*/
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
header {
|
294
|
+
|
295
|
+
width: 100%;
|
296
|
+
|
297
|
+
height: 90px;
|
298
|
+
|
299
|
+
color: #fff;
|
300
|
+
|
31
|
-
|
301
|
+
background-color: #26d0c9;
|
302
|
+
|
32
|
-
|
303
|
+
}
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
.header-logo {
|
308
|
+
|
309
|
+
float: left;
|
310
|
+
|
33
|
-
|
311
|
+
padding: 20px 40px;/*上から固定するからfloatでもOK*/
|
312
|
+
|
313
|
+
font-size: 36px;
|
314
|
+
|
315
|
+
font-weight: normal;
|
316
|
+
|
317
|
+
}
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
.header-list li {
|
322
|
+
|
323
|
+
float: left;
|
324
|
+
|
325
|
+
padding: 33px 20px;/*上から固定するからfloatでもOK*/
|
326
|
+
|
327
|
+
list-style: none;
|
328
|
+
|
329
|
+
}
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
/*---コンテンツ部分---*/
|
334
|
+
|
335
|
+
main {
|
336
|
+
|
337
|
+
padding: 100px 80px;
|
338
|
+
|
339
|
+
}
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
.copy-container h1 {
|
344
|
+
|
345
|
+
margin: 0;
|
346
|
+
|
347
|
+
font-size: 140px;
|
348
|
+
|
349
|
+
}
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
span {
|
354
|
+
|
355
|
+
color: red;
|
356
|
+
|
357
|
+
}
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
h2 {
|
362
|
+
|
363
|
+
margin: 0;
|
364
|
+
|
365
|
+
font-size: 60px;
|
366
|
+
|
367
|
+
}
|
34
368
|
|
35
369
|
```
|
36
370
|
|
37
371
|
|
38
372
|
|
39
|
-
### 該当のソースコード
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
```HTML
|
44
|
-
|
45
|
-
<!DOCTYPE html>
|
46
|
-
|
47
|
-
<!-- saved from url=(0022)http://127.0.0.1:5500/ -->
|
48
|
-
|
49
|
-
<html lang="ja">
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
<head>
|
54
|
-
|
55
|
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
60
|
-
|
61
|
-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
<title>Progate初級道場編</title>
|
66
|
-
|
67
|
-
<link rel="stylesheet" href="./index_files/style.css">
|
68
|
-
|
69
|
-
</head>
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
<body>
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<header>
|
80
|
-
|
81
|
-
<div class="header-logo">Progate</div>
|
82
|
-
|
83
|
-
<div class="header-list">
|
84
|
-
|
85
|
-
<ul>
|
86
|
-
|
87
|
-
<li>プログラミングとは</li>
|
88
|
-
|
89
|
-
<li>学べるレッスン</li>
|
90
|
-
|
91
|
-
<li>お問い合わせ</li>
|
92
|
-
|
93
|
-
</ul>
|
94
|
-
|
95
|
-
</div>
|
96
|
-
|
97
|
-
</header>
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
<main>
|
104
|
-
|
105
|
-
<div class="copy-container">
|
106
|
-
|
107
|
-
<h1>HELLO WORLD<span>.</span></h1>
|
108
|
-
|
109
|
-
<h2>プログラミングの世界へようこそ</h2>
|
110
|
-
|
111
|
-
<div class="contents">
|
112
|
-
|
113
|
-
<h3 class="section-title">学べるレッスン</h3>
|
114
|
-
|
115
|
-
<div class="contents-item"><img src="./index_files/html.svg">
|
116
|
-
|
117
|
-
<h3>HTML</h3>
|
118
|
-
|
119
|
-
<p>HTMLは~・・・・・・・</p>
|
120
|
-
|
121
|
-
</div>
|
122
|
-
|
123
|
-
<div class="contents-item"><img src="./index_files/php.svg">
|
124
|
-
|
125
|
-
<h3>CSS</h3>
|
126
|
-
|
127
|
-
<p>CSSは~・・・・・・・</p>
|
128
|
-
|
129
|
-
</div>
|
130
|
-
|
131
|
-
<div class="contents-item"><img src="./index_files/ruby.svg">
|
132
|
-
|
133
|
-
<h3>PHP</h3>
|
134
|
-
|
135
|
-
<p>PHPは~・・・・・・・</p>
|
136
|
-
|
137
|
-
</div>
|
138
|
-
|
139
|
-
<div class="contents-item"><img src="./index_files/swift.svg">
|
140
|
-
|
141
|
-
<h3>Ruby</h3>
|
142
|
-
|
143
|
-
<p>Rubyは~・・・・・・・</p>
|
144
|
-
|
145
|
-
</div>
|
146
|
-
|
147
|
-
</div>
|
148
|
-
|
149
|
-
</div>
|
150
|
-
|
151
|
-
<div class="contact-form">
|
152
|
-
|
153
|
-
<h3 class="section-title">お問い合わせ</h3>
|
154
|
-
|
155
|
-
<p>メールアドレス</p>
|
156
|
-
|
157
|
-
<input>
|
158
|
-
|
159
|
-
<p>お問い合わせ内容</p>
|
160
|
-
|
161
|
-
<textarea></textarea>
|
162
|
-
|
163
|
-
<input type="button" value="送信">
|
164
|
-
|
165
|
-
</div>
|
166
|
-
|
167
|
-
</main>
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
<footer>
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
<div class="footer-logo">Progate</div>
|
178
|
-
|
179
|
-
<div class="footer-list">
|
180
|
-
|
181
|
-
<ul>
|
182
|
-
|
183
|
-
<li>会社概要</li>
|
184
|
-
|
185
|
-
<li>採用</li>
|
186
|
-
|
187
|
-
<li>お問い合わせ</li>
|
188
|
-
|
189
|
-
</ul>
|
190
|
-
|
191
|
-
</div>
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
</footer>
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
<!-- Code injected by live-server -->
|
202
|
-
|
203
|
-
<script type="text/javascript">
|
204
|
-
|
205
|
-
// <![CDATA[ <-- For SVG support
|
206
|
-
|
207
|
-
if ('WebSocket' in window) {
|
208
|
-
|
209
|
-
(function () {
|
210
|
-
|
211
|
-
function refreshCSS() {
|
212
|
-
|
213
|
-
var sheets = [].slice.call(document.getElementsByTagName("link"));
|
214
|
-
|
215
|
-
var head = document.getElementsByTagName("head")[0];
|
216
|
-
|
217
|
-
for (var i = 0; i < sheets.length; ++i) {
|
218
|
-
|
219
|
-
var elem = sheets[i];
|
220
|
-
|
221
|
-
var parent = elem.parentElement || head;
|
222
|
-
|
223
|
-
parent.removeChild(elem);
|
224
|
-
|
225
|
-
var rel = elem.rel;
|
226
|
-
|
227
|
-
if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") {
|
228
|
-
|
229
|
-
var url = elem.href.replace(/(&|?)_cacheOverride=\d+/, '');
|
230
|
-
|
231
|
-
elem.href = url + (url.indexOf('?') >= 0 ? '&' : '?') + '_cacheOverride=' + (new Date().valueOf());
|
232
|
-
|
233
|
-
}
|
234
|
-
|
235
|
-
parent.appendChild(elem);
|
236
|
-
|
237
|
-
}
|
238
|
-
|
239
|
-
}
|
240
|
-
|
241
|
-
var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://';
|
242
|
-
|
243
|
-
var address = protocol + window.location.host + window.location.pathname + '/ws';
|
244
|
-
|
245
|
-
var socket = new WebSocket(address);
|
246
|
-
|
247
|
-
socket.onmessage = function (msg) {
|
248
|
-
|
249
|
-
if (msg.data == 'reload') window.location.reload();
|
250
|
-
|
251
|
-
else if (msg.data == 'refreshcss') refreshCSS();
|
252
|
-
|
253
|
-
};
|
254
|
-
|
255
|
-
if (sessionStorage && !sessionStorage.getItem('IsThisFirstTime_Log_From_LiveServer')) {
|
256
|
-
|
257
|
-
console.log('Live reload enabled.');
|
258
|
-
|
259
|
-
sessionStorage.setItem('IsThisFirstTime_Log_From_LiveServer', true);
|
260
|
-
|
261
|
-
}
|
262
|
-
|
263
|
-
})();
|
264
|
-
|
265
|
-
}
|
266
|
-
|
267
|
-
else {
|
268
|
-
|
269
|
-
console.error('Upgrade your browser. This Browser is NOT supported WebSocket for Live-Reloading.');
|
270
|
-
|
271
|
-
}
|
272
|
-
|
273
|
-
// ]]>
|
274
|
-
|
275
|
-
</script>
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
</body>
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
</html>
|
284
|
-
|
285
|
-
```
|
286
|
-
|
287
|
-
```CSS
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
/*
|
292
|
-
|
293
|
-
プロパティの宣言順
|
294
|
-
|
295
|
-
ルールセット内の宣言は重要なプロパティから書き始め、その機能ごとに固めて記述することで意図を素早く理解できるようにしましょう。プロパティの宣言順は以下のようなルールで記述するのを推奨します。
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
ボックスモデルの種類や表示方法を示すプロパティ(box-sizing, display, visibility, floatなど)
|
300
|
-
|
301
|
-
位置情報に関するプロパティ(position, z-indexなど)
|
302
|
-
|
303
|
-
ボックスモデルのサイズに関するプロパティ(width, height, margin, padding, borderなど)
|
304
|
-
|
305
|
-
フォント関連のプロパティ(font-size, line-heightなど)
|
306
|
-
|
307
|
-
色に関するプロパティ(color, background-colorなど)
|
308
|
-
|
309
|
-
それ以外
|
310
|
-
|
311
|
-
アルファベット順で記述することは禁止します。整列ではなく、理解しやすいように分類することが目的だからです。
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
【Good】
|
316
|
-
|
317
|
-
.foo {
|
318
|
-
|
319
|
-
display: block;
|
320
|
-
|
321
|
-
position: absolute;
|
322
|
-
|
323
|
-
right: 0;
|
324
|
-
|
325
|
-
bottom: 0;
|
326
|
-
|
327
|
-
width: 100%;
|
328
|
-
|
329
|
-
margin: 0;
|
330
|
-
|
331
|
-
padding: 0;
|
332
|
-
|
333
|
-
font-size: 0.75em;
|
334
|
-
|
335
|
-
color: #000;
|
336
|
-
|
337
|
-
background-color: #fff;
|
338
|
-
|
339
|
-
} */
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
/*---ヘッダー部分---*/
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
header {
|
350
|
-
|
351
|
-
width: 100%;
|
352
|
-
|
353
|
-
height: 90px;
|
354
|
-
|
355
|
-
color: #fff;
|
356
|
-
|
357
|
-
background-color: #26d0c9;
|
358
|
-
|
359
|
-
}
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
.header-logo {
|
364
|
-
|
365
|
-
float: left;
|
366
|
-
|
367
|
-
padding: 20px 40px;/*上から固定するからfloatでもOK*/
|
368
|
-
|
369
|
-
font-size: 36px;
|
370
|
-
|
371
|
-
font-weight: normal;
|
372
|
-
|
373
|
-
}
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
.header-list li {
|
378
|
-
|
379
|
-
float: left;
|
380
|
-
|
381
|
-
padding: 33px 20px;/*上から固定するからfloatでもOK*/
|
382
|
-
|
383
|
-
list-style: none;
|
384
|
-
|
385
|
-
}
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
/*---コンテンツ部分---*/
|
390
|
-
|
391
|
-
main {
|
392
|
-
|
393
|
-
padding: 100px 80px;
|
394
|
-
|
395
|
-
}
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
.copy-container h1 {
|
400
|
-
|
401
|
-
margin: 0;
|
402
|
-
|
403
|
-
font-size: 140px;
|
404
|
-
|
405
|
-
}
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
span {
|
410
|
-
|
411
|
-
color: red;
|
412
|
-
|
413
|
-
}
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
h2 {
|
418
|
-
|
419
|
-
margin: 0;
|
420
|
-
|
421
|
-
font-size: 60px;
|
422
|
-
|
423
|
-
}
|
424
|
-
|
425
|
-
```
|
426
|
-
|
427
|
-
|
428
|
-
|
429
373
|
### 試したこと
|
430
374
|
|
431
375
|
|
2
ご指摘を頂き、HTML、CSSファイルをすべてアップさせて頂きました。なお、画像のアップデートがpngからjpgに変更しても上手くいかず、なかなか状況をご説明しにくい点、何卒お許しください。
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,11 +28,7 @@
|
|
28
28
|
|
29
29
|
```
|
30
30
|
|
31
|
-
![イメージ説明](66917c356fc84a67a44d331167a437a5.png)
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
こちらのオレンジ色の部分がブラウザに起因するmargin(上下93.8px)だと思われます。
|
31
|
+
![イメージ説明](9eb14e62c98272a7cd7567888b249491.png)こちらのオレンジ色の部分がブラウザに起因するmargin(上下93.8px)だと思われます。
|
36
32
|
|
37
33
|
下のh2タグ内「プログラミングへようこそ」もそれぞれ上下のmarginを含んでいました。
|
38
34
|
|
@@ -46,8 +42,40 @@
|
|
46
42
|
|
47
43
|
```HTML
|
48
44
|
|
45
|
+
<!DOCTYPE html>
|
46
|
+
|
47
|
+
<!-- saved from url=(0022)http://127.0.0.1:5500/ -->
|
48
|
+
|
49
|
+
<html lang="ja">
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
<head>
|
54
|
+
|
55
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
60
|
+
|
61
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
<title>Progate初級道場編</title>
|
66
|
+
|
67
|
+
<link rel="stylesheet" href="./index_files/style.css">
|
68
|
+
|
69
|
+
</head>
|
70
|
+
|
71
|
+
|
72
|
+
|
49
73
|
<body>
|
50
74
|
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
51
79
|
<header>
|
52
80
|
|
53
81
|
<div class="header-logo">Progate</div>
|
@@ -80,12 +108,240 @@
|
|
80
108
|
|
81
109
|
<h2>プログラミングの世界へようこそ</h2>
|
82
110
|
|
111
|
+
<div class="contents">
|
112
|
+
|
113
|
+
<h3 class="section-title">学べるレッスン</h3>
|
114
|
+
|
115
|
+
<div class="contents-item"><img src="./index_files/html.svg">
|
116
|
+
|
117
|
+
<h3>HTML</h3>
|
118
|
+
|
119
|
+
<p>HTMLは~・・・・・・・</p>
|
120
|
+
|
121
|
+
</div>
|
122
|
+
|
123
|
+
<div class="contents-item"><img src="./index_files/php.svg">
|
124
|
+
|
125
|
+
<h3>CSS</h3>
|
126
|
+
|
127
|
+
<p>CSSは~・・・・・・・</p>
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
<div class="contents-item"><img src="./index_files/ruby.svg">
|
132
|
+
|
133
|
+
<h3>PHP</h3>
|
134
|
+
|
135
|
+
<p>PHPは~・・・・・・・</p>
|
136
|
+
|
137
|
+
</div>
|
138
|
+
|
139
|
+
<div class="contents-item"><img src="./index_files/swift.svg">
|
140
|
+
|
141
|
+
<h3>Ruby</h3>
|
142
|
+
|
143
|
+
<p>Rubyは~・・・・・・・</p>
|
144
|
+
|
145
|
+
</div>
|
146
|
+
|
147
|
+
</div>
|
148
|
+
|
149
|
+
</div>
|
150
|
+
|
151
|
+
<div class="contact-form">
|
152
|
+
|
153
|
+
<h3 class="section-title">お問い合わせ</h3>
|
154
|
+
|
155
|
+
<p>メールアドレス</p>
|
156
|
+
|
157
|
+
<input>
|
158
|
+
|
159
|
+
<p>お問い合わせ内容</p>
|
160
|
+
|
161
|
+
<textarea></textarea>
|
162
|
+
|
163
|
+
<input type="button" value="送信">
|
164
|
+
|
165
|
+
</div>
|
166
|
+
|
167
|
+
</main>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
<footer>
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
<div class="footer-logo">Progate</div>
|
178
|
+
|
179
|
+
<div class="footer-list">
|
180
|
+
|
181
|
+
<ul>
|
182
|
+
|
183
|
+
<li>会社概要</li>
|
184
|
+
|
185
|
+
<li>採用</li>
|
186
|
+
|
187
|
+
<li>お問い合わせ</li>
|
188
|
+
|
189
|
+
</ul>
|
190
|
+
|
191
|
+
</div>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
</footer>
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
<!-- Code injected by live-server -->
|
202
|
+
|
203
|
+
<script type="text/javascript">
|
204
|
+
|
205
|
+
// <![CDATA[ <-- For SVG support
|
206
|
+
|
207
|
+
if ('WebSocket' in window) {
|
208
|
+
|
209
|
+
(function () {
|
210
|
+
|
211
|
+
function refreshCSS() {
|
212
|
+
|
213
|
+
var sheets = [].slice.call(document.getElementsByTagName("link"));
|
214
|
+
|
215
|
+
var head = document.getElementsByTagName("head")[0];
|
216
|
+
|
217
|
+
for (var i = 0; i < sheets.length; ++i) {
|
218
|
+
|
219
|
+
var elem = sheets[i];
|
220
|
+
|
221
|
+
var parent = elem.parentElement || head;
|
222
|
+
|
223
|
+
parent.removeChild(elem);
|
224
|
+
|
225
|
+
var rel = elem.rel;
|
226
|
+
|
227
|
+
if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") {
|
228
|
+
|
229
|
+
var url = elem.href.replace(/(&|?)_cacheOverride=\d+/, '');
|
230
|
+
|
231
|
+
elem.href = url + (url.indexOf('?') >= 0 ? '&' : '?') + '_cacheOverride=' + (new Date().valueOf());
|
232
|
+
|
233
|
+
}
|
234
|
+
|
235
|
+
parent.appendChild(elem);
|
236
|
+
|
237
|
+
}
|
238
|
+
|
239
|
+
}
|
240
|
+
|
241
|
+
var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://';
|
242
|
+
|
243
|
+
var address = protocol + window.location.host + window.location.pathname + '/ws';
|
244
|
+
|
245
|
+
var socket = new WebSocket(address);
|
246
|
+
|
247
|
+
socket.onmessage = function (msg) {
|
248
|
+
|
249
|
+
if (msg.data == 'reload') window.location.reload();
|
250
|
+
|
251
|
+
else if (msg.data == 'refreshcss') refreshCSS();
|
252
|
+
|
253
|
+
};
|
254
|
+
|
255
|
+
if (sessionStorage && !sessionStorage.getItem('IsThisFirstTime_Log_From_LiveServer')) {
|
256
|
+
|
257
|
+
console.log('Live reload enabled.');
|
258
|
+
|
259
|
+
sessionStorage.setItem('IsThisFirstTime_Log_From_LiveServer', true);
|
260
|
+
|
261
|
+
}
|
262
|
+
|
263
|
+
})();
|
264
|
+
|
265
|
+
}
|
266
|
+
|
267
|
+
else {
|
268
|
+
|
269
|
+
console.error('Upgrade your browser. This Browser is NOT supported WebSocket for Live-Reloading.');
|
270
|
+
|
271
|
+
}
|
272
|
+
|
273
|
+
// ]]>
|
274
|
+
|
275
|
+
</script>
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
</body>
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
</html>
|
284
|
+
|
83
285
|
```
|
84
286
|
|
85
287
|
```CSS
|
86
288
|
|
87
289
|
|
88
290
|
|
291
|
+
/*
|
292
|
+
|
293
|
+
プロパティの宣言順
|
294
|
+
|
295
|
+
ルールセット内の宣言は重要なプロパティから書き始め、その機能ごとに固めて記述することで意図を素早く理解できるようにしましょう。プロパティの宣言順は以下のようなルールで記述するのを推奨します。
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
ボックスモデルの種類や表示方法を示すプロパティ(box-sizing, display, visibility, floatなど)
|
300
|
+
|
301
|
+
位置情報に関するプロパティ(position, z-indexなど)
|
302
|
+
|
303
|
+
ボックスモデルのサイズに関するプロパティ(width, height, margin, padding, borderなど)
|
304
|
+
|
305
|
+
フォント関連のプロパティ(font-size, line-heightなど)
|
306
|
+
|
307
|
+
色に関するプロパティ(color, background-colorなど)
|
308
|
+
|
309
|
+
それ以外
|
310
|
+
|
311
|
+
アルファベット順で記述することは禁止します。整列ではなく、理解しやすいように分類することが目的だからです。
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
【Good】
|
316
|
+
|
317
|
+
.foo {
|
318
|
+
|
319
|
+
display: block;
|
320
|
+
|
321
|
+
position: absolute;
|
322
|
+
|
323
|
+
right: 0;
|
324
|
+
|
325
|
+
bottom: 0;
|
326
|
+
|
327
|
+
width: 100%;
|
328
|
+
|
329
|
+
margin: 0;
|
330
|
+
|
331
|
+
padding: 0;
|
332
|
+
|
333
|
+
font-size: 0.75em;
|
334
|
+
|
335
|
+
color: #000;
|
336
|
+
|
337
|
+
background-color: #fff;
|
338
|
+
|
339
|
+
} */
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
89
345
|
/*---ヘッダー部分---*/
|
90
346
|
|
91
347
|
|
@@ -144,7 +400,7 @@
|
|
144
400
|
|
145
401
|
margin: 0;
|
146
402
|
|
147
|
-
font-size: 14px;
|
403
|
+
font-size: 140px;
|
148
404
|
|
149
405
|
}
|
150
406
|
|
@@ -158,11 +414,11 @@
|
|
158
414
|
|
159
415
|
|
160
416
|
|
161
|
-
h2 {
|
417
|
+
h2 {
|
162
418
|
|
163
419
|
margin: 0;
|
164
420
|
|
165
|
-
font-size: 6px;
|
421
|
+
font-size: 60px;
|
166
422
|
|
167
423
|
}
|
168
424
|
|
1
初心者マークを追加しました。また、イメージ説明が反映されていないので手を加えましたがうまくいっていないようです。申し訳ございません。
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,6 +30,8 @@
|
|
30
30
|
|
31
31
|
![イメージ説明](66917c356fc84a67a44d331167a437a5.png)
|
32
32
|
|
33
|
+
|
34
|
+
|
33
35
|
こちらのオレンジ色の部分がブラウザに起因するmargin(上下93.8px)だと思われます。
|
34
36
|
|
35
37
|
下のh2タグ内「プログラミングへようこそ」もそれぞれ上下のmarginを含んでいました。
|