Files

44 lines
2.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: bd7158d8c442eddfaeb5bd18
title: 製作一個致敬頁
challengeType: 3
forumTopicId: 301147
dashedName: build-a-tribute-page
---
# --description--
**目標:** 在 [CodePen.io](https://codepen.io) 上創建一個與這個功能類似的 app<https://codepen.io/freeCodeCamp/full/zNqgVx>
在滿足以下 [需求](https://en.wikipedia.org/wiki/User_story) 並能通過所有測試的前提下, 你可以根據自己的喜好來美化你的 app。
你可以使用 HTML、JavaScript 以及 CSS 來完成項目。 由於目前你只學到了 CSS 課程,所以我們建議你只使用 CSS 來完成這個項目,同時鞏固一下你之前所學的內容。 你也可以使用 Bootstrap 或者 SASS。 我們不推薦你在這個項目中使用其他技術(比如 jQuery、React、Angular 或 Vue。 在後續的其他項目中,你將有機會使用像是 React 等其他技術棧。 我們會接受並嘗試修復你在使用推薦技術棧創建項目時報告的問題。 祝你編碼愉快!
**需求 1** 此 app 中應存在一個 `id="main"` 的元素,頁面上的所有元素都應置於這個元素中。
**需求 2** 此 app 中應存在一個 `id="title"` 的元素,其中包含描述致敬頁主題的字符串文本,如 "Dr. Norman Borlaug"。
**需求 3** 此 app 中應存在一個 `id="img-div"``figure``div` 元素。
**需求 4**`img-div` 元素內,應存在一個 `id="image"``img` 元素。
**需求 5**`img-div` 元素內,應存在一個相應的 `id="img-caption"` 的元素,其中包含對 `img-div` 中圖像的描述文本。
**需求 6** 此 app 中應存在一個 `id="tribute-info"` 的元素,其中應包含描述致敬頁主題的內容文本。
**需求 7** 此 app 中應存在一個 `id="tribute-link"``a` 元素,它應鏈接到一個包含有關致敬頁主題額外信息的外部網頁。 提示:你必須爲 a 元素提供 `target` 屬性,並將其屬性值設置爲 `_blank`(即 `target="_blank"`),這樣纔可以在新選項卡中打開鏈接。
**需求 8** `img` 元素應相對於其父元素的寬度自動調整大小,但不超過圖片的原始大小。
**需求 9** `img` 應在其父元素內居中。
你可以<a href='https://codepen.io/pen?template=MJjpwO' target='_blank' rel='nofollow'>使用這個 CodePen 模版</a>創建你的新項目,點擊 `Save` 即可創建你的新項目。 也可以使用此 CDN 鏈接在任何你喜歡的環境中運行測試:`https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js`
完成項目並通過所有測試後,請輸入你的項目在 CodePen 上的鏈接並提交。
# --solutions--
```html
// solution required
```