39 lines
3.8 KiB
Markdown
39 lines
3.8 KiB
Markdown
---
|
||
id: bd7158d8c442eddfaeb5bd13
|
||
title: Build a Random Quote Machine
|
||
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/qRZeGZ" target="_blank">https</a> <strong>:</strong> <a href="https://codepen.io" target="_blank">//codepen.io/freeCodeCamp/full/qRZeGZ</a> 。完成以下<a href="https://en.wikipedia.org/wiki/User_story" target="_blank">用户故事</a>并通过所有测试。给它你自己的个人风格。您可以使用HTML,JavaScript,CSS,Bootstrap,SASS,React,Redux和jQuery的任意组合来完成此项目。您应该使用前端框架(例如React),因为本节是关于学习前端框架的。不建议使用上面未列出的其他技术,使用它们的风险由您自行承担。我们正在寻求支持其他前端框架,如Angular和Vue,但目前不支持它们。我们将接受并尝试修复所有使用建议的技术堆栈的问题报告。快乐的编码! <strong>用户故事#1:</strong>我可以看到一个包含相应<code>id="quote-box"</code>的包装元素。 <strong>用户故事#2:</strong>在<code>#quote-box</code> ,我可以看到一个具有相应<code>id="text"</code>的元素。 <strong>用户故事#3:</strong>在<code>#quote-box</code> ,我可以看到一个具有相应<code>id="author"</code>的元素。 <strong>用户故事#4:</strong>在<code>#quote-box</code> ,我可以看到一个具有相应<code>id="new-quote"</code>的可点击元素。 <strong>用户故事#5:</strong>在<code>#quote-box</code> ,我可以看到一个可点击的<codea< code="">具有相应<code>id="tweet-quote"</code>元素。 <strong>用户故事#6:</strong>首次加载时,我的报价机器会在元素中显示一个<code>id="text"</code>的随机引号。 <strong>用户故事#7:</strong>首次加载时,我的报价机器在<code>id="author"</code>的元素中显示随机引用的作者。 <strong>用户故事#8:</strong>当单击<code>#new-quote</code>按钮时,我的报价机应该获取一个新报价并将其显示在<code>#text</code>元素中。 <strong>用户故事#9:</strong>当单击<code>#new-quote</code>按钮并将其显示在<code>#author</code>元素中时,我的报价机器应该获取新报价的作者。 <strong>用户故事#10:</strong>我可以点击<code>#tweet-quote</code> <code>a</code>元素来<code>#tweet-quote</code> 。这<code>a</code>元素应包括<code>"twitter.com/intent/tweet"</code>路径在它的<code>href</code>属性鸣叫当前报价。 <strong>用户故事#11:</strong> <code>#quote-box</code>包装器元素应该水平居中。请使用浏览器的缩放级别100%和页面最大化运行测试。您可以通过分叉<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>方法。 </codea<></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>
|