39 lines
3.7 KiB
Markdown
39 lines
3.7 KiB
Markdown
|
---
|
|||
|
id: bd7158d8c442eddfaeb5bd18
|
|||
|
title: Build a Tribute Page
|
|||
|
isRequired: true
|
|||
|
challengeType: 3
|
|||
|
videoUrl: ''
|
|||
|
localeTitle: 建立致敬页面
|
|||
|
---
|
|||
|
|
|||
|
## Description
|
|||
|
<section id="description"> <strong>目标:</strong>构建一个功能类似于此的<a href="https://codepen.io" target="_blank">CodePen.io</a>应用程序: <a href="https://codepen.io/freeCodeCamp/full/zNqgVx" target="_blank">https</a> <strong>:</strong> <a href="https://codepen.io" target="_blank">//codepen.io/freeCodeCamp/full/zNqgVx</a> 。完成以下<a href="https://en.wikipedia.org/wiki/User_story" target="_blank">用户故事</a>并通过所有测试。给它你自己的个人风格。您可以使用HTML,JavaScript和CSS来完成此项目。建议使用纯CSS,因为这是迄今为止所涵盖的课程,您应该使用纯CSS进行一些练习。如果您愿意,可以使用Bootstrap或SASS。此项目不建议使用其他技术(例如jQuery,React,Angular或Vue),使用它们需要您自担风险。其他项目将使您有机会使用不同的技术堆栈,如React。我们将接受并尝试修复所有使用建议的技术堆栈的问题报告。快乐的编码! <strong>用户故事#1:</strong>我的致敬页面应该有一个对应<code>id="main"</code>元素,其中包含所有其他元素。 <strong>用户故事#2:</strong>我应该看到一个具有相应<code>id="title"</code>的元素,其中包含描述贡品页面主题的字符串(即文本)(例如“Dr. Norman Borlaug”)。 <strong>用户故事#3:</strong>我应该看到一个带有对应<code>id="img-div"</code>的<code>div</code>元素。 <strong>用户故事#4:</strong>在<code>img-div</code>元素中,我应该看到一个带有相应<code>id="image"</code>的<code>img</code>元素。 <strong>用户故事#5:</strong>在<code>img-div</code>元素中,我应该看到一个元素具有相应的<code>id="img-caption"</code> ,其中包含描述<code>img-div</code>显示的图像的文本内容。 <strong>用户故事#6:</strong>我应该看到一个带有相应<code>id="tribute-info"</code>的元素,其中包含描述贡品页面主题的文本内容。 <strong>用户故事#7:</strong>我应该看到一个带有相应<code>id="tribute-link"</code> <code>a</code>元素, <code>a</code>元素链接到一个外部网站,其中包含有关致敬页面主题的其他信息。提示:您必须为元素提供<code>target</code>属性并将其设置为<code>_blank</code> ,以便在新选项卡中打开链接(即<code>target="_blank"</code> )。 <strong>用户故事#8:</strong> <code>img</code>元素应相对于其父元素的宽度响应地调整大小,而不超过其原始大小。 <strong>用户故事#9:</strong> <code>img</code>元素应该在其父元素中居中。您可以通过分叉<a href="http://codepen.io/freeCodeCamp/pen/MJjpwO" target="_blank">此CodePen笔</a>来构建项目。或者您可以使用此CDN链接在您喜欢的任何环境中运行测试: <code>https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js</code> : <code>https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js</code> 。完成后,将URL提交到工作项目,并传递所有测试。如果卡住,请记住使用<a href="https://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514" target="_blank">Read-Search-Ask</a>方法。 </section>
|
|||
|
|
|||
|
## Instructions
|
|||
|
<section id="instructions">
|
|||
|
</section>
|
|||
|
|
|||
|
## Tests
|
|||
|
<section id='tests'>
|
|||
|
|
|||
|
```yml
|
|||
|
tests: []
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
</section>
|
|||
|
|
|||
|
## Challenge Seed
|
|||
|
<section id='challengeSeed'>
|
|||
|
|
|||
|
</section>
|
|||
|
|
|||
|
## Solution
|
|||
|
<section id='solution'>
|
|||
|
|
|||
|
```js
|
|||
|
// solution required
|
|||
|
```
|
|||
|
</section>
|