-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathexceed-icon-font-sh.html
739 lines (650 loc) · 19.3 KB
/
exceed-icon-font-sh.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
<!doctype html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8">
<title>超越 icon font 上海场</title>
<meta name="author" content="yisi">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="超越 icon font">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="initial-scale=1, maximum-scale=3, minimum-scale=1, minimal-ui">
<link rel="stylesheet" href="css/reveal.min.css">
<link rel="stylesheet" href="css/theme/sky.css" id="theme">
<!-- For syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<link rel="stylesheet" href="css/demo/icon-github.css">
<!-- If the query includes 'print-pdf', use the PDF print sheet -->
<script>
document.write('<link rel="stylesheet" href="css/print/' + (window.location.search.match(/print-pdf/gi) ? 'pdf' : 'paper') + '.css" type="text/css" media="print">');
</script>
<script src="http://g.tbcdn.cn/kissy/k/1.3.2/seed-min.js"></script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
<style>
.summary .line {
overflow: hidden;
white-space: nowrap;
}
.summary .line a {
display: table-cell;
vertical-align: middle;
width: 180px;
text-align: center;
}
.summary .content {
display: table-cell;
vertical-align: middle;
padding-left: 20px;
text-align: left;
overflow: hidden;
*zoom:1;
}
.powered {
position: fixed;
left: 20px;
bottom: 20px;
color: #555;
}
.powered p {
margin: 6px auto;
}
.powered a {
color: #555;
}
.reveal[data-background-transition=slide]>.backgrounds .slide-background, .reveal>.backgrounds .slide-background[data-background-transition=slide] {
background-size: contain;
background-position: 10% 30%;
}
.reveal>.backgrounds .slide-background:nth-of-type(1),
.reveal>.backgrounds .slide-background:nth-of-type(2) {
background-size: 80%;
background-position: 50% 30px;
}
.reveal>.backgrounds .slide-background:nth-last-of-type(2) {
background-size: cover;
background-position: 50% 50%;
}
.reveal .author {
margin-top: 100px;
font-size: 60px;
}
.reveal .title {
margin-top: 60px;
}
.icon-box {
position: relative;
background: url(img/photo-icon.svg) 50% 50% no-repeat;
background-size: 66%;
}
.icon-box img {
width: 66%;
}
.fade-box {
position: relative;
min-height: 500px;
}
.fade-box img {
position: absolute;
left: 0;
right: 0;
margin: auto !important;
}
.qrcode {
width: 500px;
}
.mux-logo {
position: fixed;
z-index: 999;
left: 20px;
top: 20px;
}
.icon-demo {
margin: 50px auto 0 !important;
width: 99%;
}
.icon-demo .icon-test {
font-family: icon-test;
min-height: 160px;
line-height: 160px;
border: 1px solid #bbb;
border-radius: 8px;
font-size: 100px;
display: block;
padding: 3px 0;
color: cadetblue;
}
.icon-demo .icon-test:focus {
outline: 0 none;
}
.icon-test {
position: relative;
letter-spacing: .3em;
word-wrap: break-word;
word-break: break-all;
-webkit-user-modify: read-write-plaintext-only; /* 粘贴时过滤富文本 */
}
.icon-test:focus {
outline: 1px solid #66AFE9;
border-color: #66AFE9;
box-shadow: 0 0 8px rgba(102, 175, 233, 0.56);
}
.icon-test pre {
padding:0 6px;
letter-spacing: normal;
overflow: hidden;
background: none;
box-shadow: none;
}
.icon-test {
font-family: "icon-test";
font-size: 16px;
font-style: normal;
font-weight: normal;
font-variant: normal;
/* 1 */
speak: none;
/* 2 */
-webkit-font-smoothing: antialiased;
/* 3 */
-moz-osx-font-smoothing: grayscale;
}
@font-face {
font-family: "icon-test";
font-weight: normal;
font-style: normal;
src: url("http://t.tbcdn.cn/apps/e/brix/fonts/uxiconfont.eot");
src: url("http://t.tbcdn.cn/apps/e/brix/fonts/uxiconfont.eot?#iefix") format("embedded-opentype"), url("http://t.tbcdn.cn/apps/e/brix/fonts/uxiconfont.woff") format("woff"), url("http://t.tbcdn.cn/apps/e/brix/fonts/uxiconfont.ttf") format("truetype"), url("http://t.tbcdn.cn/apps/e/brix/fonts/uxiconfont.svg#iconfont") format("svg");
}
.user .con{
display: table-cell;
vertical-align: middle;
text-align: left;
padding-right: 20px;
}
.user .con img {
max-height: none;
max-width: 100%;
}
.user .con h3+h3 {
border-bottom: 2px solid #000;
min-width: 3em;
line-height: 1.3;
}
</style>
<script type="text/javascript" src="js/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="js/socket.io.min.js"></script>
<script type="text/javascript" src="js/qrcode.min.js"></script>
<script type="text/javascript">
var env;
$(function() {
$('#demo-github').click(function() {
$(this).toggleClass('active');
})
})
$.ajax({
// url: 'http://localhost:3000/getEnv',
// dataType: 'jsonp',
// success: function(data) {
// env = data;
url: 'http://localhost:3000/env',
dataType: 'jsonp',
success: function(data){
env = data;
// draw qrcode
var qrcodedraw = new QRCodeLib.QRCodeDraw();
var request = ['http://', env.ip, ':', env.port, '/mobile/control'].join('');
qrcodedraw.draw(document.querySelector('.qrcode'), request, function(err){
if(err){
return console.log(err.message);
}
});
}
})
var socket = io.connect('http://localhost:3000');
socket.on('animate', function() {
if ($('#qrcode').css('display') !== 'none') {
$('#demo-github').toggleClass('active');
}
})
var socket = io.connect('http://localhost:3000');
socket.emit('ppt');
socket.on('ppt left', function(){
Reveal.left();
});
socket.on('ppt right', function(){
Reveal.right();
});
</script>
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<!-- 二维码 -->
<section>
<canvas class="qrcode"></canvas>
</section>
<section data-background-transition="slide" data-background="img/iOS7-icon-grid.svg">
<h1 class="title">超越 icon font</h1>
<p class="author fragment">
<a href="http://www.iyunlu.com/view" traget="blank">一丝</a>
<br>2014-6-28 于上海</p>
</section>
<section data-previous-indexv="2">
<h2>关于我</h2>
<div class="summary">
<div class="line">
<a href="http://weibo.com/jieorlin/" target="_blank">
<img src="img/av.jpg" alt="">
</a>
<div class="content">
<h3 class="user-name">我是一丝</h3>
<p>阿里巴巴前端</p>
</div>
</div>
<div class="line">
<a href="http://weibo.com/fekb" target="_blank">
<img src="http://tp1.sinaimg.cn/3244329632/180/40023910983/0" alt="">
</a>
<div class="content">
<p>「前端快爆」作者</p>
</div>
</div>
<ul class="">
<li>
博客:
<a href="http://www.iyunlu.com/view">http://www.iyunlu.com/view</a>
</li>
<li>
微博:
<a href="http://t.qq.com/yisibl">http://t.qq.com/yisibl</a>
</li>
</ul>
</div>
</section>
<section>
<h2>我的偶像?</h2>
<!-- <p>我有三个偶像,面朝西溪,忘了是谁了。。。</p> -->
</section>
<section>
<h2>我的特质?</h2>
<img class="fragment" src="img/24k.gif" width="200" alt="">
</section>
<section>
<h2>事实是?</h2>
<img class="" src="img/xiamian.gif" width="300" alt="">
</section>
<section>
<h2>我的特质?</h2>
<img class="" src="img/xiaoxian.gif" width="500" alt="">
</section>
<section>
<h2>如何快速切图?</h2>
</section>
<section>
<h2 class="">很久以前……</h2>
<h2 class="">我们如何使用图标?</h2>
</section>
<section>
<h2>1.切图</h2>
<img src="img/ps1.png" alt="">
</section>
<section>
<h2>2.拼合(Sprites)</h2>
<img src="img/icon.png" alt="">
</section>
<section>
<h2>原始社会</h2>
<img src="img/original.png" alt="">
</section>
<section>
<h2>后来</h2>
<ul>
<li><a href="http://www.99css.com/archives/tag/cssgaga">CSSGaga</a></li>
<li class=""><a href="https://www.npmjs.org/package/grunt-css-sprite">grunt-css-sprite</a></li>
</ul>
</section>
<section>
<h2>再后来……</h2>
</section>
<section>
<h2>现实是?</h2>
<img src="img/t-white.png" alt="">
</section>
<section id="section-color" data-background-transition="slide" data-background="img/desiger.png">
<h2>换个颜色</h2>
<img src="" alt="">
<img src="img/t-red.png" alt="">
</section>
<section data-background-transition="slide" data-background="img/desiger.png">
<h2>改个大小吧</h2>
<img src="img/t-red.png" width="200" height="200" alt="">
</section>
<section data-background-transition="slide" data-background="img/desiger.png">
<h2>换个角度吧</h2>
<img src="img/t-red-45.png" alt="">
</section>
<section>
<h2>欧巴→欧吉桑</h2>
<img src="img/li2.jpg" alt="">
<img src="img/li1.png" alt="">
</section>
<section>
<h2>什么是(zhi)体图标捏?</h2>
</section>
<section>
<h2>就是用(zhi)体语言摆个图标</h2>
<img src="img/firefox.gif" alt="">
</section>
<section>
<h2>相见不曾相识……</h2>
<p class="fragment">
<img src="img/sofish.png" alt="sofish">
</p>
</section>
<section>
<h2>iOS 自带的字体图标</h2>
<p><a href="http://zh.wikipedia.org/wiki/%E7%B9%AA%E6%96%87%E5%AD%97">Emoji 绘文字</a>
</p>
<div class="fade-box">
<img class="fragment" src="img/icon1.png" alt="">
<img class="fragment" src="img/icon2.png" alt="">
<img class="fragment" src="img/keybord.png" alt="">
</div>
</section>
<section>
<h2>相见不曾相识……</h2>
<img src="http://gtms01.alicdn.com/tps/i1/T1rnyPFvNaXXc_0NYn-808-416.png" alt="">
</section>
<section>
<h2>扒衣见君</h2>
<img src="http://gtms03.alicdn.com/tps/i3/T1X5WPFAFiXXb7HNTn-808-381.png" alt="">
</section>
<section>
<h2>iconfont 实时预览</h2>
<div class="icon-demo">
<div id="test" class="icon-test"></div>
</div>
<script type="text/javascript">
KISSY.use('node, event', function(S, N, E) {
S.ready(function(S) {
var $ = S.all;
$(".icon-test").on("focus", function() {
var content = $(this).html();
var htmlStr = "";
for (var i = 0; i < content.length; i++) {
htmlStr += '&#' + content.charCodeAt(i) + ';';
};
if (content.length == 0) htmlStr = '&#32;';
$(this).html("<pre>" + htmlStr + "</pre>")
});
$(".icon-test").on("blur", function() {
var str = $(this).html();
var htmlStr = "";
var unicodeArray;
str = str.replace(/<\/?pre>/g, "");
str = S.one('<textarea />').html(str).val();
if (/&#\d+;/.test(str)) {
unicodeArray = str.split(";");
for (var i = 0; i < unicodeArray.length; i++) {
htmlStr += String.fromCharCode(unicodeArray[i].replace(/[&#;]/g, ''));
}
$(this).html(htmlStr);
} else {
alert("unicode 不合法!");
}
});
});
})
</script>
</section>
<section>
<h2>icon font 效果</h2>
<img src="img/ie6.png" alt="">
<img src="img/ie10.png" alt="">
</section>
<section>
<h2>icon font 效果</h2>
<img src="img/mac.png" alt="">
</section>
<section>
<h2>淘宝首页</h2>
<img src="img/taobao.png" alt="">
</section>
<section>
<h2>淘宝集市</h2>
<img src="img/jishi.png" alt="">
</section>
<section>
<h2>如何制作 icon font</h2>
<ul>
<li>iconfont.cn 直接上传 SVG
<br>
<img src="img/up.png" alt="">
</li>
</ul>
</section>
<section>
<h2>iOS7 图标栅格</h2>
<p class="icon-box">
<img class="icon-photo fragment" src="img/iOS7-icon-grid.svg" alt="iOS7 photo icon">
</p>
</section>
<section>
<h2>制作的注意事项</h2>
<img src="img/icon-g.png" alt="">
</section>
<section>
<h2>制作的注意事项</h2>
<img src="img/illustrator-endmark.png" alt="">
</section>
<section>
<h2>制作的注意事项</h2>
<img src="img/ai.png" alt="">
</section>
<section>
<h2>如何使用?</h2>
<p>1. 引用字体</p>
<pre><code>
@font-face {
font-family: 'FontName';
src:url('FileName.eot'); /* IE9+ */
/* IE6-IE8 */
src:url('FileName.eot?#iefix') format('embedded-opentype'),
/* CR,FF */
url('FileName.woff') format('woff'),
/* CR,FF,OP,Safari,Android, iOS 4.2+ */
url('FileName.ttf') format('truetype'),
/* iOS 4.1- */
url('FileName.svg#FontName') format('svg');
}
</code></pre>
</section>
<section>
<h2>如何使用?</h2>
<p>2. 定义一个Class使用字体</p>
<pre><code>
.iconfont {
font-family: "iconfont";
font-size: 16px;
font-style: normal;
font-weight: normal;
font-variant: normal;
line-height: 1;
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</code></pre>
</section>
<section>
<h2>如何使用?</h2>
<p>3. 获取图标编码</p>
<pre><code>
<span class="iconfont">#3301</span>
</code></pre>
</section>
<section>
<img src="img/font1.png" alt="">
</section>
<section>
<h2>为何要用 icon font?</h2>
</section>
<section>
<h2>icon font 优点</h2>
<ul>
<li>图标矢量化</li>
<li><a href="https://github.com/thx/cube/blob/gh-pages/src/iconfont-all.css#L52" target="_blank">让样式回归 CSS</a>
<pre><code>
<h2 class="icon-size">标题前面有一个图标</h2>
.icon-size {
content: "\3436";
}
</code></pre>
</li>
<li>图标规范化</li>
<li>自动上传到阿里云CDN</li>
</ul>
</section>
<section>
<h2>icon font 缺点</h2>
<ul>
<li>色彩单一?</li>
<li>不同平台显示效果参差不齐</li>
<li>需要专门维护
<img src="img/iconfont.png" alt="">
</li>
</ul>
</section>
<section>
<h2>超越 icon font?</h2>
<p>见证奇迹的时刻到了!</p>
</section>
<section>
<h2>多彩图标</h2>
<div class="demo" id="demo-github">
<div class="iconfont icon-github" data-fragment-index="1">
<span></span>
</div>
</div>
</section>
<section>
<h2>撸一撸</h2>
<a href="#"><img src="img/lulu.png" alt=""></a>
</section>
<section>
<h2><a href="http://forecastfont.iconvau.lt/">多彩图标-镂空法</a>
</h2>
<img src="img/g2.jpg" alt="">
<p>放大后:
<br>
<img src="img/g1.jpg" alt="">
</p>
</section>
<section>
<h2><a href="http://forecastfont.iconvau.lt/">多彩图标-叠加法</a>
</h2>
<img src="http://gtms02.alicdn.com/tps/i2/T1MxyOFB4cXXaxJprD-606-407.png" alt="">
</section>
<section>
<img src="img/color-icon.png" alt="">
</section>
<section>
<h2><a href="http://jsbin.com/qixacoga/1/watch?css,output" target="_blank">响应式图标</a>
</h2>
<img src="http://uisdc.qiniudn.com/wp-content/uploads/2013/12/responsive-icons-animation.gif" alt="">
</section>
<section>
<h2><a href="http://jsbin.com/gutesepu/1" target="_blank">响应式图标</a>
</h2>
<h3>设计与辨识度的平衡</h3>
<img src="http://uisdc.qiniudn.com/wp-content/uploads/2013/10/sizes.png" alt="">
</section>
<section>
<h2>未来?</h2>
<h3>SVG 矢量动画图标</h3>
<a href="http://yisibl.github.io/loveicon/">
<img src="img/love-icon.gif" alt="">
</a>
</section>
<section>
<h2>SVG 矢量动画图标</h2>
<h3>livicons</h3>
<a href="http://livicons.com/#promo7">
<img src="img/icon-a.png" alt="">
</a>
</section>
<section data-background-transition="slide" data-background="img/tbg.png">
</section>
<section>
<h2>Q&A</h2>
<h3>Thank You ^_^</h3>
</section>
</div>
</div>
<div class="powered">
<p>《超越 icon font》上海场</p>
</div>
<!-- <div class="mux-logo">
<img src="http://gtms01.alicdn.com/tps/i1/T1PY5OFBXdXXcMmhDl-216-94.png" alt="">
</div> -->
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.min.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
mouseWheel: false,
keyboard: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'concave', // default/cube/page/concave/zoom/linear/fade/none
// Parallax scrolling
// parallaxBackgroundImage: 'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg',
// parallaxBackgroundSize: '2100px 900px',
// Optional libraries used to extend on reveal.js
dependencies: [{
src: 'lib/js/classList.js',
condition: function() {
return !document.body.classList;
}
}, {
src: 'plugin/markdown/marked.js',
condition: function() {
return !!document.querySelector('[data-markdown]');
}
}, {
src: 'plugin/markdown/markdown.js',
condition: function() {
return !!document.querySelector('[data-markdown]');
}
}, {
src: 'plugin/highlight/highlight.js',
async: true,
callback: function() {
hljs.initHighlightingOnLoad();
}
}, {
src: 'plugin/zoom-js/zoom.js',
async: true,
condition: function() {
return !!document.body.classList;
}
}, {
src: 'plugin/notes/notes.js',
async: true,
condition: function() {
return !!document.body.classList;
}
}]
});
$('canvas').on('click', function() {
socket.emit('clear');
});
</script>
</body>
</html>