12 |
IconFont 图标
13 |
14 |
15 | -
16 |
17 |
回复
18 | 
19 | .huifu
20 |
21 |
22 | -
23 |
24 |
微招聘
25 | 
26 | .job
27 |
28 |
29 | -
30 |
31 |
返回
32 | 
33 | .fanhui
34 |
35 |
36 | -
37 |
38 |
点赞
39 | 
40 | .dianzan
41 |
42 |
43 | -
44 |
45 |
首页
46 | 
47 | .shouye
48 |
49 |
50 | -
51 |
52 |
发布
53 | 
54 | .fabu
55 |
56 |
57 | -
58 |
59 |
分享
60 | 
61 | .share
62 |
63 |
64 | -
65 |
66 |
我的
67 | 
68 | .wode
69 |
70 |
71 | -
72 |
73 |
精华
74 | 
75 | .good
76 |
77 |
78 | -
79 |
80 |
消息
81 | 
82 | .xiaoxi
83 |
84 |
85 | -
86 |
87 |
置顶
88 | 
89 | .top
90 |
91 |
92 | -
93 |
94 |
问答
95 | 
96 | .ask
97 |
98 |
99 | -
100 |
101 |
退出
102 | 
103 | .tuichu
104 |
105 |
106 |
107 |
108 |
109 |
110 | 第一步:使用font-face声明字体
111 |
112 | @font-face {font-family: 'iconfont';
113 | src: url('iconfont.eot'); /* IE9*/
114 | src: url('iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
115 | url('iconfont.woff') format('woff'), /* chrome、firefox */
116 | url('iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
117 | url('iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
118 | }
119 |
120 | 第二步:定义使用iconfont的样式
121 |
122 | .iconfont{
123 | font-family:"iconfont" !important;
124 | font-size:16px;font-style:normal;
125 | -webkit-font-smoothing: antialiased;
126 | -webkit-text-stroke-width: 0.2px;
127 | -moz-osx-font-smoothing: grayscale;}
128 |
129 | 第三步:挑选相应图标并获取字体编码,应用于页面
130 |
131 | <i class="iconfont">3</i>
132 |
133 |
134 |
135 |
136 |
137 |
138 |
--------------------------------------------------------------------------------
/src/Component/IndexList.jsx:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | // import { Router, Route, IndexRoute, browserHistory, Link } from 'react-router';
3 | import {NavLink as Link } from 'react-router-dom';
4 | import { connect } from 'react-redux';
5 | import action from '../Action/Index';
6 | import { Tool, merged } from '../Tool';
7 | import { DataLoad, Footer, UserHeadImg, TabIcon, GetNextPage } from './common/index';
8 | import queryString from 'query-string';
9 |
10 |
11 | /**
12 | * (导航分类)
13 | *
14 | * @class Nav
15 | * @extends {Component}
16 | */
17 | class Nav extends Component {
18 | render() {
19 | var setCur = {};
20 | setCur[this.props.tab] = 'on';
21 | return (
22 |