ポートフォリオページを作成
- 生成AIで作成したプロフィールを元に作成(詳細は、オリジナル作成)
- 名前:田中 景子 (たなか けいこ)
- 撮影ポリシー:自然の中に完全に溶け込み、長時間じっくりと被写体を観察することで、最高の一瞬を逃さずに捉えることができます。
- 写真はすべて「美しい無料画像と写真の数々 | Unsplash」から
unsplash.com
unsplash.com
unsplash.com
unsplash.com
課題
- 以下の例を元にページを完成させましょう
- テキストと画像は、適宜作成しましょう
- レイアウトは、ワンカラム(全体を、「div class="container"」で囲む)
- 「dl」内の「dt」と「dd」は、横並び
- 全体幅は、「680px」としています
完成例
<!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>【コーディング練習】ポートフォリオ</title> <link rel="stylesheet" href="css/style.css"> </head> <body> <div class="container"> <!-- header --> <header class="header"> <h1>田中景子</h1> <img src="img/profile.webp" alt="田中景子の写真"> </header> <!-- /header --> <!-- main--> <main class="main"> <section class="section-wrap"> <h2>プロフィール</h2> <dl> <dt>生年月日:</dt><dd>1998.2.22</dd> <dt>出身:</dt><dd>東京都池袋</dd> <dt>趣味:</dt><dd>カメラ撮影 / 音楽を聴くこと</dd> <dt>好きな言葉:</dt><dd>想像すること できることできないことことが沢山ある 気づくことから始めよう(オノヨーコ)</dd> </dl> </section> <section class="section-wrap"> <h2>略歴</h2> <dl> <dt>1998年02月:</dt><dd>東京都池袋で産まれる</dd> <dt>2004年04月:</dt><dd>池袋の小学校に入学</dd> <dt>2016年04月:</dt><dd>写真の専門学校に入学</dd> <dt>2018年12月:</dt><dd>Webデザインスクールに入学</dd> </dl> </section> <section class="section-wrap"> <h2>私の作品</h2> <ul> <li> <p>スペインの風景</p> <img src="img/photo01.webp" alt="スペインの風景"> </li> <li> <p>スペインの風景</p> <img src="img/photo02.webp" alt="スペインの風景"> </li> <li> <p>スペインの風景</p> <img src="img/photo03.webp" alt="スペインの風景"> </li> </ul> </section> </main> <!-- /main--> <!-- .footer --> <footer class="footer"> <p><small>© 2024 田中景子ポートフォリオ</small></p> </footer> <!-- /.footer --> </div><!-- /.container --> </body> </html>
@charset "UTF-8"; /* ------------------------------------ reset ------------------------------------ */ * { margin: 0; padding: 0; box-sizing: border-box; } ul { list-style: none; } a { color: inherit; text-decoration: none; } img { max-width: 100%; vertical-align: bottom; } /* ------------------------------------ body ------------------------------------ */ body { background-color: #fff; color: #333; font-size: 16px; font-family: Arial, sans-serif; line-height: 1.7; } /* ------------------------------------ layout ------------------------------------ */ .container { max-width: 680px; margin: 0 auto; } /* ------------------------------------ header ------------------------------------ */ .header { margin-bottom: 30px; } .header h1 { margin-bottom: 20px; border-bottom: 1px solid #397cc3; text-align: center; } /* ------------------------------------ section ------------------------------------ */ .section-wrap { margin-bottom: 40px; } .section-wrap h2 { margin-bottom: 20px; padding: 8px 0 6px 1em; background-color: #397cc3; color: #fff; font-size: 22px; } .section-wrap dl { display: flex; flex-wrap: wrap; width: 100%; padding: 0 22px; } .section-wrap dt, .section-wrap dd { padding: 6px 0; } .section-wrap dt { width: 120px; font-weight: bold; } .section-wrap dd { flex-basis: calc(100% - 120px); } .section-wrap li { margin-bottom: 30px; } .section-wrap p { margin-bottom: 6px; } /* ------------------------------------ footer ------------------------------------ */ .footer { padding: 20px; border-top: 1px dotted #333; text-align: center; }