質問編集履歴

3

修正

2019/05/18 05:00

投稿

Akaho
Akaho

スコア39

test CHANGED
File without changes
test CHANGED
@@ -284,7 +284,7 @@
284
284
 
285
285
  追記
286
286
 
287
- 回答から改善したコードと画像
287
+ 回答から 改善したコードと画像
288
288
 
289
289
  ```css
290
290
 

2

回答から得た解決内容を追記した。

2019/05/18 05:00

投稿

Akaho
Akaho

スコア39

test CHANGED
File without changes
test CHANGED
@@ -279,3 +279,207 @@
279
279
  }
280
280
 
281
281
  ```
282
+
283
+
284
+
285
+ 追記
286
+
287
+ 回答から改善したコードと画像
288
+
289
+ ```css
290
+
291
+ コード
292
+
293
+ /* CSSのリセット(消さないでください) */
294
+
295
+ html, body,
296
+
297
+ ul, ol, li,
298
+
299
+ h1, h2, h3, h4, h5, h6, p, div {
300
+
301
+ margin: 0;
302
+
303
+ padding: 0;
304
+
305
+ }
306
+
307
+ img{
308
+
309
+ max-width:100%;
310
+
311
+ height:auto;
312
+
313
+ }
314
+
315
+
316
+
317
+ body {
318
+
319
+ font-family: 'Hiragino Kaku Gothic ProN W3', sans-serif;
320
+
321
+ }
322
+
323
+
324
+
325
+ li {
326
+
327
+ list-style: none;
328
+
329
+ }
330
+
331
+
332
+
333
+ a {
334
+
335
+ text-decoration: none;
336
+
337
+ }
338
+
339
+
340
+
341
+ /* ここからCSSを書いていきましょう */
342
+
343
+ .container-header{
344
+
345
+ display:inline-block;
346
+
347
+ background-color:rgba(34, 49, 52, 0.9);
348
+
349
+ width:1280px;
350
+
351
+ height:65px;
352
+
353
+ }
354
+
355
+ .header-left{
356
+
357
+ margin-top:20px;
358
+
359
+ width:124px;
360
+
361
+ position:relative;left:60px;
362
+
363
+ }
364
+
365
+
366
+
367
+ .logo{
368
+
369
+ width:124px;
370
+
371
+ height:auto;
372
+
373
+ }
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+ .header-right{
382
+
383
+ padding-bottom:304px;
384
+
385
+ }
386
+
387
+
388
+
389
+
390
+
391
+ .top-wrapper{
392
+
393
+ height:580px;
394
+
395
+ width:1280px;
396
+
397
+ background-image:url(https://prog-8.com/images/html/advanced/top.png);
398
+
399
+ background-size:cover;
400
+
401
+ text-align:center;
402
+
403
+
404
+
405
+ }
406
+
407
+ .container h1{
408
+
409
+ font-size:45px;
410
+
411
+ opacity:0.7;
412
+
413
+ letter-spacing:5px;
414
+
415
+ color:white;
416
+
417
+ font-weight:bold;
418
+
419
+ padding-top:170px;
420
+
421
+ }
422
+
423
+ .container p{
424
+
425
+ font-size:16px;
426
+
427
+ margin-bottom:30px;
428
+
429
+ color:white;
430
+
431
+ opacity:0.7;
432
+
433
+ }
434
+
435
+ .btn{
436
+
437
+ padding:8px 24px;
438
+
439
+ color:white;
440
+
441
+ opacity:0.8;
442
+
443
+ border-radius:4px;
444
+
445
+ }
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+ .sign-up{
454
+
455
+ background-color:#239b76;
456
+
457
+ margin:30px 0px 15px 0;
458
+
459
+
460
+
461
+
462
+
463
+ }
464
+
465
+ .facebook{
466
+
467
+ background:#3b5998;
468
+
469
+ margin-right:10px;
470
+
471
+ margin-bottom:100px;
472
+
473
+ margin-top:15px;
474
+
475
+ }
476
+
477
+ .twitter{
478
+
479
+ background:#55acee;
480
+
481
+ }
482
+
483
+ ```
484
+
485
+ ![イメージ説明](e88206db138b0343bc16b5b515c411bc.png)

1

自分で調べたリンク先を追加

2019/05/18 04:59

投稿

Akaho
Akaho

スコア39

test CHANGED
File without changes
test CHANGED
@@ -8,8 +8,12 @@
8
8
 
9
9
    グーグルで 画像サイズ 縮小するには cssと検索し、どうやらwidthがキーになっている事がわかりました。
10
10
 
11
+ [リンク内容](https://www.nishishi.com/css/resize-image-keep-aspect-ratio.html)
12
+
11
13
    そのため、要素の検証で画像のwidthを確認し、自分のcssも見たところ124pxで相違なかった。
12
14
 
15
+
16
+
13
17
    何が原因なのか分からないです。教えて下さい。
14
18
 
15
19