Build a Random Quote Machine - ruilee16/myFreeCodeCamp GitHub Wiki
###Build a Random Quote Machine|名言生成器
Build a web page that could get random quotes from a database. Here are some examples:FCC:Random Quote Machine
- I can click a button to show me a new random quote.
- I can press a button to tweet out a quote.
html | javascript | css |
---|---|---|
<h1>title</h1> |
function getQuote(){} |
1.position |
<div class="quoteContainer"></div> |
var quotes=[{},{}...] |
2.backgroun-color changing and animation |
<button class="but" onclick="getQuote()"></button> |
3. | |
ps: | ||
1.可以用外部API引用名言,也可以自己创建一个名言库。 |
I could use a quote API to imput the quotes' data, or create a parameter to hold the JSON string in <script>
tag.
-
$(document).ready()
。 - 用jQuery写的函数可以放在html文件外部么?
- 如何使用API?
- JSON 数据的读取与处理。
- 学会选择字体及配色。Font and color
- 怎么把twitter功能加到我的文档里?
- 如何使用css给网页添加动画效果?用html 或者 javascript呢?
#####references|参考
- Ziplin Build a random quote machine.Ziplin的名言生成器
- add icon to
<html>
document w3school.添加社交媒体的标签 - tweet out: using onclick()+window.open()/using +$(this).attr('href','...')