質問編集履歴

6

2019/04/27 04:20

投稿

risacuspin
risacuspin

スコア18

test CHANGED
File without changes
test CHANGED
@@ -8,9 +8,7 @@
8
8
 
9
9
 
10
10
 
11
- cssバリデーションでコードを確認しましたがエラーはありませんでした。
12
-
13
- また、画像の名前・保存場所合っています。
11
+ 画像の名前・保存場所合っています。
14
12
 
15
13
 
16
14
 

5

2019/04/27 04:20

投稿

risacuspin
risacuspin

スコア18

test CHANGED
File without changes
test CHANGED
File without changes

4

2019/04/27 04:20

投稿

risacuspin
risacuspin

スコア18

test CHANGED
File without changes
test CHANGED
File without changes

3

2019/04/27 04:19

投稿

risacuspin
risacuspin

スコア18

test CHANGED
File without changes
test CHANGED
File without changes

2

2019/04/27 04:18

投稿

risacuspin
risacuspin

スコア18

test CHANGED
File without changes
test CHANGED
@@ -18,18 +18,534 @@
18
18
 
19
19
 
20
20
 
21
+ ```css
22
+
23
+ @charset "UTF-8";
24
+
25
+
26
+
27
+ /* すべてのWebページに適用される */
28
+
29
+ html {
30
+
31
+ font-family: sans-serif;
32
+
33
+ }
34
+
35
+ html * {
36
+
37
+ box-sizing: border-box;
38
+
39
+ }
40
+
41
+ body {
42
+
43
+ margin: 0 0 0 0;
44
+
45
+ background-color: #eeece9;
46
+
47
+ }
48
+
49
+ .wrapper {
50
+
51
+ margin: 0 auto 0 auto;
52
+
53
+ max-width: 960px;
54
+
55
+ }
56
+
57
+ h2{
58
+
59
+ color: #3f5170;
60
+
61
+ font-size: 22px;
62
+
63
+ border-bottom: 3px dotted #3f5170;
64
+
65
+ margin-top: 20px;
66
+
67
+ margin-right: 0px;
68
+
69
+ margin-bottom: 20px;
70
+
71
+ margin-left: 0px;
72
+
73
+ padding-top: 5px;
74
+
75
+ padding-right: 5px;
76
+
77
+ padding-bottom: 5px;
78
+
79
+ padding-left: 5px;
80
+
81
+ }
82
+
83
+ p {
84
+
85
+ line-height: 1.6;
86
+
87
+ }
88
+
89
+ a:link{
90
+
91
+ color: #d25833;
92
+
93
+ }
94
+
95
+ a:visited{
96
+
97
+ color: #d25833;
98
+
99
+ }
100
+
101
+ a:hover{
102
+
103
+ color: #e3937a;
104
+
105
+ }
106
+
107
+ a:active{
108
+
109
+ color: #ff6a3b;
110
+
111
+ }
112
+
113
+ img {
114
+
115
+ max-width: 100%;
116
+
117
+ height: auto;
118
+
119
+ }
120
+
121
+
122
+
123
+ /* すべてのページに適用 - ヘッダー - */
124
+
125
+ .logo {
126
+
127
+ margin: 50px 0 40px 0;
128
+
129
+ line-height: 0;
130
+
131
+ text-align: center;
132
+
133
+ }
134
+
135
+ .nav li {
136
+
137
+ display: inline;
138
+
139
+ list-style-type: none;
140
+
141
+ padding-right: 30px;
142
+
143
+ }
144
+
145
+ .nav ul {
146
+
147
+ margin: 0 0 0 0;
148
+
149
+ padding: 20px 10px 15px 20px;
150
+
151
+ background-image: url(../images/menu-bg.png);
152
+
153
+ background-repeat: repeat-x;
154
+
155
+ }
156
+
157
+ .nav a:link {
158
+
159
+ color: #3c454d;
160
+
161
+ text-decoration: none;
162
+
163
+ }
164
+
165
+ .nav a:visited {
166
+
167
+ color: #3c454d;
168
+
169
+ text-decoration: none;
170
+
171
+ }
172
+
173
+ .nav a:hover {
174
+
175
+ color: #7b8dac;
176
+
177
+ text-decoration: none;
178
+
179
+ }
180
+
181
+ .nav a:active {
182
+
183
+ color: #5a9bc0;
184
+
185
+ text-decoration: none;
186
+
187
+ }
188
+
189
+
190
+
191
+ /* すべてのページに適用 - フッター - */
192
+
193
+ .footer {
194
+
195
+ background-image: url(../images/footer-bg.png);
196
+
197
+ background-repeat: no-repeat;
198
+
199
+ margin-top: 30px;
200
+
201
+ padding: 80px 15px 20px 15px;
202
+
203
+ font-size: 12px;
204
+
205
+ color: #3f5170;
206
+
207
+ }
208
+
209
+
210
+
211
+ /* 個別のスタイル */
212
+
213
+ /* index.html */
214
+
215
+ .keyvisual {
216
+
217
+ margin: 15px 0 0 0;
218
+
219
+ }
220
+
221
+ .news-item {
222
+
223
+ margin: 0;
224
+
225
+ }
226
+
227
+
228
+
229
+ /* about.html */
230
+
231
+ .shop-photo {
232
+
233
+ float: left;
234
+
235
+ padding: 0 1em 1em 0;
236
+
237
+ }
238
+
239
+ .clear {
240
+
241
+ clear: both;
242
+
243
+ }
244
+
245
+ /* テーブル */
246
+
247
+ .info {
248
+
249
+ border-collapse: collapse;
250
+
251
+ }
252
+
253
+ .info th, .info td {
254
+
255
+ padding: 8px;
256
+
257
+ border: 1px solid #bec2c7;
258
+
259
+ text-align: left;
260
+
261
+ }
262
+
263
+ .info th {
264
+
265
+ background-color: #dde2ea;
266
+
267
+ width: 90px;
268
+
269
+ color: #3f5170;
270
+
271
+ vertical-align: top;
272
+
273
+ }
274
+
275
+
276
+
277
+ /* menu.htmi */
278
+
279
+ .menu-item {
280
+
281
+ display: flex;
282
+
283
+ border-bottom: 1px dashed #bec2c7;
284
+
285
+ padding: 20px 8px;
286
+
287
+ }
288
+
289
+ .menu-photo {
290
+
291
+ margin-right: 16px;
292
+
293
+ flex: 1 1 auto;
294
+
295
+ }
296
+
297
+ .menu-text {
298
+
299
+ flex: 0 0 336px;
300
+
301
+ }
302
+
303
+
304
+
305
+ /* access.html */
306
+
307
+ .map {
308
+
309
+ text-align: center;
310
+
311
+ }
312
+
313
+
314
+
315
+ /* contact.html */
316
+
317
+ form div {
318
+
319
+ padding: 12px;
320
+
321
+ border-bottom: 1px dashed #bec2c7;
322
+
323
+ }
324
+
325
+ select {
326
+
327
+ width: 30em;
328
+
329
+ }
330
+
331
+ input[name="subject"] {
332
+
333
+ width: 30em;
334
+
335
+ }
336
+
337
+ textarea {
338
+
339
+ width: 30em;
340
+
341
+ height: 6em;
342
+
343
+ }
344
+
345
+ input[type="submit"] {
346
+
347
+ margin: 20px 0;
348
+
349
+ width: 30em;
350
+
351
+ }
352
+
353
+
354
+
355
+ /* スマートフォン向けCSS */
356
+
357
+ @media (max-width: 767px) {
358
+
359
+ /* 全体 - ナビゲーション */
360
+
361
+ .wrapper {
362
+
363
+ margin: 0 8px;
364
+
365
+ }
366
+
367
+ .logo {
368
+
369
+ margin: 30px 0;
370
+
371
+ }
372
+
373
+ .logo img {
374
+
375
+ width: 200px;
376
+
377
+ }
378
+
379
+ .nav {
380
+
381
+ background-color: #dfddda;
382
+
383
+ }
384
+
385
+ .nav li {
386
+
387
+ display: block;
388
+
389
+ }
390
+
391
+
392
+
393
+ /* menu.html - 横並び解除 */
394
+
395
+ .menu-item {
396
+
397
+ display: block;
398
+
399
+ }
400
+
401
+ .menu-photo {
402
+
403
+ margin-right: 0;
404
+
405
+ width: 100%
406
+
407
+ }
408
+
409
+ .menu-text {
410
+
411
+ width: 100%;
412
+
413
+ }
414
+
415
+
416
+
417
+ /* about.html - 画像のパディングを調整 */
418
+
419
+ .shop-photo {
420
+
421
+ padding-right: 0;
422
+
423
+ }
424
+
425
+
426
+
427
+ /* contact.html - フォーム */
428
+
429
+ select {
430
+
431
+ width: 100%;
432
+
433
+ }
434
+
435
+ input[name="subject"] {
436
+
437
+ width: 100%;
438
+
439
+ }
440
+
441
+ textarea {
442
+
443
+ width: 100%;
444
+
445
+ }
446
+
447
+ input[type="submit"] {
448
+
449
+ margin: 20px 0;
450
+
451
+ width: 100%;
452
+
453
+ }
454
+
455
+ }
456
+
457
+
458
+
21
459
  ```
22
460
 
461
+
462
+
463
+
464
+
23
- .nav ul {
465
+ ```html
466
+
24
-
467
+ <!doctype html>
468
+
469
+ <html>
470
+
471
+ <head>
472
+
473
+ <meta charset="UTF-8">
474
+
475
+ <meta name="viewport" contaent="width=device-width, initial-scale=1">
476
+
477
+ <title>KUJIRA Cafeへようこそ</title>
478
+
479
+ <link rel="stylesheet" href="css/style.css">
480
+
481
+ </head>
482
+
483
+ <body>
484
+
485
+ <div class="wrapper">
486
+
487
+ <!-- ヘッダー -->
488
+
489
+ <header class="header">
490
+
491
+ <h1 class="logo"><a href="index.html"><img src="images/logo.png" alt="KUJIRA Cafe"></a></h1>
492
+
493
+ <nav class="nav">
494
+
495
+ <ui>
496
+
497
+ <li><a href="index.html">ホーム</a></li>
498
+
499
+ <li><a href="about.html">店舗案内</a></li>
500
+
501
+ <li><a href="access.html">アクセス</a></li>
502
+
503
+ <li><a href="menu.html">メニュー</a></li>
504
+
505
+ <li><a href="contact.html">お問い合わせ</a></li>
506
+
507
+ </ui>
508
+
509
+ </nav>
510
+
511
+ </header>
512
+
513
+ <!-- ヘッダー ここまで -->
514
+
25
- margin: 0 0 0 0;
515
+ <!-- メイン -->
26
-
516
+
27
- padding: 20px 10px 15px 20px;
517
+ <div class="keyvisual">
28
-
518
+
29
- background-image: url(../images/smenu-bg.png);
519
+ <img src="images/keyvisual.jpg" alt="">
520
+
30
-
521
+ </div>
522
+
523
+ <main>
524
+
525
+ <h2 id="news">News</h2>
526
+
527
+ <p class="news-item">4月29日(土)は、九寺楽町の春祭りに出店するため、お店は休業させていたただきます。春祭りでタルトやキッシュ、コーヒーも販売するので、ぜひお越しください。</p>
528
+
529
+ <p class="news-item">3月20日(月・祝)は、18時からアコースティックギターデュオ「<a href="http://www.sbcr.jp" target="_blank">PICNIC</a>」のライブを開催します。投げ銭方式です。お楽しみに!</p>
530
+
531
+ </main>
532
+
533
+ <!-- メイン ここまで -->
534
+
535
+ <!-- フッター -->
536
+
537
+ <footer class="footer">
538
+
539
+ <p>&copy;Copyright KUJIRA Cafe. All rights reserved.</p>
540
+
541
+ </footer>
542
+
31
- background-repeat: repeat-x;
543
+ <!-- フッター ここまで -->
32
-
544
+
33
- }
545
+ </div>
546
+
547
+ </body>
548
+
549
+ </html>
34
550
 
35
551
  ```

1

2019/04/27 04:16

投稿

risacuspin
risacuspin

スコア18

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,4 @@
1
- 背景画像の指定
1
+ **背景画像の指定
2
2
 
3
3
 
4
4
 
@@ -14,9 +14,11 @@
14
14
 
15
15
 
16
16
 
17
- どうすれば背景画像が表示されるでしょうか。
17
+ どうすれば背景画像が表示されるでしょうか。**
18
18
 
19
19
 
20
+
21
+ ```
20
22
 
21
23
  .nav ul {
22
24
 
@@ -29,3 +31,5 @@
29
31
  background-repeat: repeat-x;
30
32
 
31
33
  }
34
+
35
+ ```