ドットインストールでホームページ作成の練習をしていますが、説明文を左右交互に入れたいのにコードを入れても反映されません。
なぜか教えて頂けないでしょうか。
HTML
1コード 2<!DOCTYPE html> 3<html lang="ja"> 4<head> 5 <meta charset="utf-8"> 6 <title>Dotinstall Paneを使ってみよう </title> 7 <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous"> 8 <link rel="stylesheet" href="css/styles.css"> 9</head> 10<body> 11 <header class="orange-bg"> 12 <div class="container"> 13 <h1>Dotinstall Pane</h1> 14 <p> 15 ドットインストールを見ながら<br> 16 コーディングができるAtomパッケージ 17 </p> 18 <a href="#" target="_blank" 19 class="btn">詳細を見る <i class="fas fa-external-link-alt"></i></a> 20 <img src="img/top.png" 21 width="480" height="270" 22 alt="Dotistall Paneの画像"> 23 </div> 24 </header> 25 26 <section class="features"> 27 <div class="container"> 28 <h1 data-subtitle="- Features -" class="section-title">Dotinstall Paneの特徴</h1> 29 <section class="feature"> 30 <img src="img/feature1.png" 31 width="420" height="270" alt="特徴1"> 32 <div class=desc""> 33 <h1>すごい特徴があるよ!</h1> 34 <p>いろいろあります。いろいろあります。いろいろあります。いろいろあります。いろいろあります。いろいろあります。いろいろあります。いろいろあります。</p> 35 <section class="feature"> 36 <img src="img/feature2.png" 37 width="420" height="270" alt="特徴2 38 "> 39 <div class=desc""> 40 <h1>すごい特徴があるよ!</h1> 41 <p>いろいろあります。いろいろあります。いろいろあります。いろいろあります。いろいろあります。いろいろあります。いろいろあります。いろいろあります。</p> 42 <section class="feature"> 43 <img src="img/feature3.png" 44 width="420" height="270" alt="特徴3"> 45 <div class=desc""> 46 <h1>すごい特徴があるよ!</h1> 47 <p>いろいろあります。いろいろあります。いろいろあります。いろいろあります。いろいろあります。いろいろあります。いろいろあります。いろいろあります。</p> 48 </div> 49 </section> 50</body> 51</html> 52
CSS
1コード 2body { 3 font-size: 16px; 4 font-family: Verdana, sans-serif; 5 color: #333; 6 margin: 0; 7} 8 9.container { 10 width: 820px; 11 margin: 0 auto; 12 padding: 60px 0; 13} 14 15.orange-bg { 16 color: #fff; 17 background: url(../img/bg.png); 18 background-size: cover; 19} 20 21.section-title { 22 text-align: center; 23 font-weight: normal; 24 font-size: 24px; 25} 26 27.section-title::after { 28 content: attr(data-subtitle); 29display: block; 30font-size: 16px; 31color: #aaa; 32padding-top: 10px; 33} 34 35/* header */ 36 37header h1 { 38 margin-top: 0; 39 font-weight: normal; 40 font-size: 36px; 41 margin-bottom: 8px; 42} 43 44header p { 45 margin-top: 0; 46 margin-bottom: 50px; 47} 48 49header .container { 50 position: relative; 51} 52 53header img { 54 position: absolute; 55 bottom: 0; 56 right: 0; 57} 58 59.btn { 60 display: inline-block; 61 width: 290px; 62 background: #fff; 63 color: #f39800; 64 text-align: center; 65 text-decoration: none; 66 padding: 8px 0; 67 border-radius: 5px; 68 opacity: 0.9; 69} 70 71.btn:hover { 72 opacity: 1.0; 73} 74 75/* features */ 76 77.feature h1 { 78 font-weight: normal; 79 font-size: 18px; 80} 81 82.feature .desc { 83 width: 360px; 84} 85 86.feature:nth-of-type(odd) .desc { 87 float: right; 88 padding-left: 40px; 89} 90 91.feature:nth-of-type(even) .desc { 92 float: left; 93 padding-right: 40px; 94} 95
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/08/26 14:55