|
发表于 2017-1-28 22:43:30
|
显示全部楼层
本帖最后由 ipakk 于 2017-1-28 22:46 编辑 5 E7 r C% u+ ~+ `
9 v3 r- M, o) p2 T5 @; U4 u
向右的柱状图- <div id="bar-chart" class="graphic"></div>
复制代码
0 L# ?" t0 M+ E3 g脚注
6 {, Z6 J/ _8 s$ F( M' [: s(刚观察CNN某网站的源码和框架偶然发现:Refugees from countries targeted in Trump's order,源码和框架在这里看:- <!DOCTYPE html>' f0 ]& {- W. X7 h5 k
- <!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]-->1 h7 t/ _3 I+ F
- <!--[if IE 8]> <html class="lt-ie9"> <![endif]-->3 s- p% J9 A5 k) R& ?; l
- <!--[if IE 9 ]> <html class="ie9" lang="en-US"> <![endif]-->
! G0 y1 S& Q8 j - <!--[if (gt IE 9)|!(IE)]><!--> <html lang="en-US"> <!--<![endif]-->" S, r, N, O* S- s! |7 M7 m9 o6 H
- <head>
+ W6 d& z0 X1 p! s. ] - 9 }3 Z& h, p8 C6 v% u7 K
- <meta charset="utf-8">
O- M9 U# }$ ^/ _2 y" l - <meta name="robots" content="noindex">2 F) q7 j/ a2 Y! `. g2 Y! n
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
2 c" j" K7 L; o: e - <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">; k; M$ S8 C8 v9 h% h& J% m4 U# @
' U+ M8 J3 s# \5 _) P5 S7 \- <title>CNN : Graphic : Refugees from countries targeted in Trump's order</title>5 d; K+ l) G, Z& C' a& I4 M& P
3 h# r! p" N% c/ M4 s1 I! k& r- <meta name="title" content="Refugees from countries targeted in Trump's order">
" k1 H! K2 G! B0 S - <meta name="description" content="">+ v& i4 Q6 `/ R/ {& c# J% C: v1 U
- <meta name="keywords" content="">
% |0 c" ^) o V% W9 c - <meta name="news_keywords" content="">
5 X4 k4 v# s1 {% ~: ~ - <meta name="section" content="">/ M! @2 n: o- d* |
- <meta name="source" content="CNN">
! z" [' k0 p+ }4 r( q' C% E9 {: h - <meta name="subsection" content="">9 G$ P% |. V2 F, z* q: Z
- <meta name="application-name" content="CNN">3 X8 E; [/ V- ?
- 9 ~" c" G1 C- {
- <!-- Facebook settings -->
# r$ P7 i+ w3 a u, w; D+ R - <meta property="og:description" content="">
" D% p: m7 V8 h' ~ - <meta property="og:image" content="">
' f1 O, C2 }/ y6 _2 a - <meta property="og:type" content="">9 y" d) S5 Q' a4 R) L
- <meta property="og:title" content="Refugees from countries targeted in Trump's order">
9 ^9 u2 e6 j9 P, V - <meta property="og:url" content="">
* U. b% V- F- T6 B; y; V$ I! } - <meta property="fb:admins" content="690014395">( w0 P% Y$ _4 c% i8 G
- <meta property="fb:app_id" content="80401312489">% ~" L$ U6 f9 v( z
$ a" T; k/ g! d, g- <!-- Twitter card settings -->3 n* \& p- a8 |. V
- <meta name="twitter:card" content="summary_large_image">
7 x& j% d! s( p. j8 x# n5 T9 e' s - <meta name="twitter:site" content="@cnn">
1 z7 O O2 @( [* E - <meta name="twitter:site:id" content="759251">
" S; `" F7 e3 f. s - <meta name="twitter:creator" content="@cnn">/ {/ f* v5 Y5 n! g4 ~
- <meta name="twitter:title" content="Refugees from countries targeted in Trump's order">
7 V. ] Q5 ]' t0 a% [! q3 O9 k - <meta name="twitter:description" content="">+ s1 J4 E, G3 g0 M2 |* u
) K2 q/ d8 A$ W8 b" U u. X7 N3 I- <link rel="canonical" href="">. a B- @/ {; w1 O% U) i
- <link rel="shortcut icon" href="//cnn.com/favicon.ie9.ico">
$ p6 Y z1 D( ? - <link rel="apple-touch-icon" href="//i.cdn.turner.com/cnn/.e/img/3.0/global/misc/apple-touch-icon.png">, E+ t7 L! L3 {8 K" M: J
- <link rel="stylesheet" type="text/css" href="css/graphic-header.css?1485524128" />3 s2 |* I) W. x" W
( o& c: i! b8 d8 n# N7 i7 {- <base target="_blank">8 H3 g, j( ^4 U- E9 Z
- ( I4 {- e7 U+ l- S! a
- </head>: g1 V. U/ U3 U( u# r
- # _8 ^/ D" [' S+ Z6 z$ h
- <body>
8 H6 M+ o) N8 o - <header>
$ y; _% o) M3 z g( S: Y# i- r - <!-- javascripts -->
) i3 @7 |+ [. J; S1 j -
+ R& u" o- X: D/ t- K. S - <script type="text/javascript" src="js/graphic-header.js?1485524128"></script>1 S/ v3 B' I% S+ j% v
- <script type="text/javascript" src="//z.cdn.turner.com/cnn/.e/js/libs/jquery-1.9.1.min.js"></script>
/ M0 J' M1 @3 u - </header>
+ l" `/ H% u/ O6 l2 {2 a7 X; ?1 [
: t% w8 Y6 ]; P$ P4 @& K2 _1 x- <section>
) m, n8 A, T9 ^, C# F - / C6 m8 T% S( d( b! c, U1 g3 o! T
) n+ k% i2 ?2 w$ Q% |6 e- <div id="meta">
, Z! L: V4 ]& e# R7 Q - <h1 class="hed">Refugees from countries targeted in Trump's order</h1>
; i# N; b# c% {$ V: J - <h2 class="dek">In fiscal 2016, US admitted 36,722 refugees from Iraq, Iran, Syria, Yemen, Sudan, Somalia and Libya.</h2>& a" m) y1 w: u T" q+ K: F0 C
- </div>
' c$ H' X# c1 w. V3 c2 G+ t, z - , g" Z. I% @( }( s. C1 D5 A
- <div id="bar-chart" class="graphic"></div>4 T. K& R" h) B4 \# i, ~
* U; N* w+ ^$ k- <div id="footer">* c2 i5 ]3 F ?7 n$ R' v7 I
- $ R2 b% {; ]1 n% | `: e+ z# W
- <p class="source">Source: Refugee Processing Center / US State Department’s Bureau of Population, Refugees and Migration</p>
% s7 E6 q2 U: c! ]; A - </div>! Z+ _- ^, v( A
, f m# n/ ~" ^" ?* I- <script type="text/javascript">
+ |/ K+ B$ P4 n. r' c8 a9 L - var DATA = [{"label": "Syria", "amt": "12587"}, {"label": "Iraq", "amt": "9880.0"}, {"label": "Somalia", "amt": "9020"}, {"label": "Iran", "amt": "3750.0"}, {"label": "Sudan", "amt": "1458"}, {"label": "Yemen", "amt": "26"}, {"label": "Libya", "amt": "1"}];
5 G; C" K' Q2 t5 X4 d0 s$ \+ o - </script>1 c6 [& W3 P) p/ p
+ B$ h0 X- K9 d$ Q1 K
9 |" `+ |& m2 t- s( f1 Y& H- </section>
( o' t/ \1 [1 D1 N; ?: w' E: t/ h6 q - - d4 h, K& X+ c8 ]# `$ f
- <footer>" `) y( P6 y1 W" K2 q
- <!-- javascripts -->: T, K" x6 X, {
- <script src="//z.cdn.turner.com/cnn/.e/interactive/js/lib/vendor/pym/pym.v1.min.js"></script>: N3 _0 O' ^; e) G5 i" K; e- Z
- <script src="//z.cdn.cnn.com/cnn/.e/interactive/js/lib/vendor/d3/d3-4.3.0-min.js"></script>
# o0 B+ X1 Q6 W8 U0 P% J
% A" b, d9 ^+ } Q5 H6 W- 2 Q3 P+ s- {: Z& ^, ]
- # [ f' W% j% x/ D8 C% o* R
-
* _6 W. F) j7 U/ M. L - # v$ v- o& O% k; `7 b
- <script type="text/javascript" src="js/graphic-footer.js?1485524128"></script>
6 M3 A$ n7 O# B+ D3 H2 A7 G
. o' C- a" n1 v. r9 @$ a- </footer>% A0 G4 Q6 o/ h
- </body>" ~/ F5 V$ l6 o7 g5 @
- </html>
复制代码
; o4 j9 G% h* h) [. m% v+ M6 C& y; J3 l9 w7 D
5 d$ G5 @& q1 ]3 q1 c8 t7 [
好像还要画图,用什么工具画? 有谁知道吗,可否推荐一个比较好的工具,谢谢! |
|