-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
901 lines (503 loc) · 30.3 KB
/
index.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
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>银狐前端之窝</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="web技术">
<meta property="og:type" content="website">
<meta property="og:title" content="银狐前端之窝">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="银狐前端之窝">
<meta property="og:description" content="web技术">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="银狐前端之窝">
<meta name="twitter:description" content="web技术">
<link rel="alternative" href="/atom.xml" title="银狐前端之窝" type="application/atom+xml">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="stylesheet" href="/css/style.css" type="text/css">
<script type="text/javascript">
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?73865c1c8c73ec1f1f2b19050977635e";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
<div id="container">
<div class="left-col">
<div class="overlay"></div>
<div class="intrude-less">
<header id="header" class="inner">
<a href="/" class="profilepic">
<img lazy-src="http://7xon9l.com1.z0.glb.clouddn.com/201242114143975681.jpg" class="js-avatar">
</a>
<hgroup>
<h1 class="header-author"><a href="/">银狐</a></h1>
</hgroup>
<p class="header-subtitle">web小白</p>
<div class="switch-btn">
<div class="icon">
<div class="icon-ctn">
<div class="icon-wrap icon-house" data-idx="0">
<div class="birdhouse"></div>
<div class="birdhouse_holes"></div>
</div>
<div class="icon-wrap icon-ribbon hide" data-idx="1">
<div class="ribbon"></div>
</div>
<div class="icon-wrap icon-link hide" data-idx="2">
<div class="loopback_l"></div>
<div class="loopback_r"></div>
</div>
<div class="icon-wrap icon-me hide" data-idx="3">
<div class="user"></div>
<div class="shoulder"></div>
</div>
</div>
</div>
<div class="tips-box hide">
<div class="tips-arrow"></div>
<ul class="tips-inner">
<li>菜单</li>
<li>标签</li>
<li>友情链接</li>
<li>关于我</li>
</ul>
</div>
</div>
<div class="switch-area">
<div class="switch-wrap">
<section class="switch-part switch-part1">
<nav class="header-menu">
<ul>
<li><a href="/archives">所有文章</a></li>
<li><a href="/categories/移动端/">移动端</a></li>
<li><a href="/categories/javascript/">JS</a></li>
<li><a href="/categories/随笔/">随笔</a></li>
</ul>
</nav>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/dengxiaozhen" title="github">github</a>
<a class="weibo" target="_blank" href="http://weibo.com/206139456" title="weibo">weibo</a>
<a class="mail" target="_blank" href="mailto:[email protected]" title="mail">mail</a>
</div>
</nav>
</section>
<section class="switch-part switch-part2">
<div class="widget tagcloud" id="js-tagcloud">
<a href="/tags/CSS/" style="font-size: 10px;">CSS</a> <a href="/tags/CSS3/" style="font-size: 15px;">CSS3</a> <a href="/tags/DOM/" style="font-size: 20px;">DOM</a> <a href="/tags/JQ/" style="font-size: 15px;">JQ</a> <a href="/tags/PHP/" style="font-size: 10px;">PHP</a> <a href="/tags/Sublime-Text/" style="font-size: 10px;">Sublime Text</a> <a href="/tags/UA/" style="font-size: 10px;">UA</a> <a href="/tags/bug/" style="font-size: 10px;">bug</a> <a href="/tags/es6/" style="font-size: 10px;">es6</a> <a href="/tags/github/" style="font-size: 10px;">github</a> <a href="/tags/hexo/" style="font-size: 10px;">hexo</a> <a href="/tags/jQuery/" style="font-size: 10px;">jQuery</a> <a href="/tags/node/" style="font-size: 10px;">node</a> <a href="/tags/webStorm/" style="font-size: 10px;">webStorm</a> <a href="/tags/webview/" style="font-size: 10px;">webview</a> <a href="/tags/zepto/" style="font-size: 10px;">zepto</a> <a href="/tags/双击/" style="font-size: 10px;">双击</a> <a href="/tags/微信/" style="font-size: 15px;">微信</a> <a href="/tags/移动端/" style="font-size: 15px;">移动端</a> <a href="/tags/键盘遮挡/" style="font-size: 10px;">键盘遮挡</a>
</div>
</section>
<section class="switch-part switch-part3">
<div id="js-friends">
<a target="_blank" class="main-nav-link switch-friends-link" href="http://www.52cik.com/">楼教主</a>
<a target="_blank" class="main-nav-link switch-friends-link" href="http://www.softwhy.com/">蚂蚁部落</a>
<a target="_blank" class="main-nav-link switch-friends-link" href="http://sentsin.com/">贤心</a>
<a target="_blank" class="main-nav-link switch-friends-link" href="http://www.zhangxinxu.com/">张鑫旭博文</a>
</div>
</section>
<section class="switch-part switch-part4">
<div id="js-aboutme">我是银狐,我是银狐,我是银狐,重要的事说三遍…</div>
</section>
</div>
</div>
</header>
</div>
</div>
<div class="mid-col">
<nav id="mobile-nav">
<div class="overlay">
<div class="slider-trigger"></div>
<h1 class="header-author js-mobile-header hide">银狐</h1>
</div>
<div class="intrude-less">
<header id="header" class="inner">
<div class="profilepic">
<img lazy-src="http://7xon9l.com1.z0.glb.clouddn.com/201242114143975681.jpg" class="js-avatar">
</div>
<hgroup>
<h1 class="header-author">银狐</h1>
</hgroup>
<p class="header-subtitle">web小白</p>
<nav class="header-menu">
<ul>
<li><a href="/archives">所有文章</a></li>
<li><a href="/categories/移动端/">移动端</a></li>
<li><a href="/categories/javascript/">JS</a></li>
<li><a href="/categories/随笔/">随笔</a></li>
<div class="clearfix"></div>
</ul>
</nav>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/dengxiaozhen" title="github">github</a>
<a class="weibo" target="_blank" href="http://weibo.com/206139456" title="weibo">weibo</a>
<a class="mail" target="_blank" href="mailto:[email protected]" title="mail">mail</a>
</div>
</nav>
</header>
</div>
</nav>
<div class="body-wrap">
<article id="post-ios-picture" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/06/28/ios-picture/" class="article-date">
<time datetime="2016-06-28T03:34:00.000Z" itemprop="datePublished">2016-06-28</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/06/28/ios-picture/">ios端的网页上传图片后图片翻转90度的问题</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>iPhone在移动端网页上传照片,可能会出现图片翻转的问题。这是因为当时拍照的时候,可能是拿反的姿势。所以,在上传之前就要做下处理。<br>这里要需要到一个东西叫<code>exif orientation</code>,取到这个信息就知道当时是怎么拍的。</p>
<p>然后用canvas去重绘这张图,获取重绘后的新图的base64值。这才是转过的图片。<br><code>canvas drawImage方法</code>、<code>getdataUrl方法获取base64值</code>、<code>初始化一个canvas 然后用drawImage方法把图画到canvas上</code>、<code>然后用rotate方法旋转</code>、然后用<code>toDataURL</code>方法就能取得base64值了。</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/移动端/">移动端</a></li></ul>
</div>
<div class="article-category tagcloud">
<a class="article-category-link" href="/categories/javascript/">javascript</a>
</div>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-jq-gt-lt" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/06/27/jq-gt-lt/" class="article-date">
<time datetime="2016-06-27T09:17:00.000Z" itemprop="datePublished">2016-06-27</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/06/27/jq-gt-lt/">jQuery的Sizzle选择器</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h4 id=":gt、:lt">:gt、:lt</h4><p>jQuery有一些基本筛选的选择器,其中:gt、:lt可能用的相对比较少,知道的人可能也不多,所以做下分享。</p>
<blockquote>
<p>:gt()呢 就是索引大于某个值的元素。比如<br>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/jQuery/">jQuery</a></li></ul>
</div>
<div class="article-category tagcloud">
<a class="article-category-link" href="/categories/javascript/">javascript</a>
</div>
<p class="article-more-link">
<a href="/2016/06/27/jq-gt-lt/#more">more >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-ios-webview-alert" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/06/22/ios-webview-alert/" class="article-date">
<time datetime="2016-06-22T03:01:00.000Z" itemprop="datePublished">2016-06-22</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/06/22/ios-webview-alert/">ios webview alert弹窗不显示网址解决办法</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>移动端alert弹窗都会显示出页面的网址,很丑,以前的版本,ios和android都可以通过重写webview的alert等弹窗事件来隐藏掉弹窗的标题,但是ios7之后,api被禁用了,导致ios无法重写来实现隐藏标题,后来想过几种方案:</p>
<ol>
<li><p>通过js调用ios原生代码来实现,即:<code>window.alert = function(str){window.local.href=”xx://str/”+str}</code></p>
</li>
<li><p>js+html+css 模拟,但是为了实现alert等的阻塞执行,需要把后面的代码放入回调函数中执行</p>
</li>
</ol>
<p>但是还是感觉这两种方式实现不太优雅,都需要对现有代码做比较大的改动,不死心,于是继续google,终于发现个好办法:</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">window</span>.alert = <span class="function"><span class="keyword">function</span>(<span class="params">name</span>)</span>{</span><br><span class="line"> <span class="keyword">var</span> iframe = <span class="built_in">document</span>.createElement(<span class="string">"IFRAME"</span>);</span><br><span class="line"> iframe.style.display=<span class="string">"none"</span>;</span><br><span class="line"> iframe.setAttribute(<span class="string">"src"</span>, <span class="string">'data:text/plain,'</span>);</span><br><span class="line"> <span class="built_in">document</span>.documentElement.appendChild(iframe);</span><br><span class="line"> <span class="built_in">window</span>.frames[<span class="number">0</span>].window.alert(name);</span><br><span class="line"> iframe.parentNode.removeChild(iframe);</span><br><span class="line">}</span><br><span class="line">alert(<span class="string">'xxx'</span>);</span><br></pre></td></tr></table></figure>
<p>这个方法在于重写了alert方法(confirm方法同理),不需要改动现有代码,并且解决了弹窗标题出现网址的问题。不过需要注意的是,每次在框架中执行完一个alert/confirm后,需要将框架移除,下次再重新载入,否则在chrome中会引发跨域执行,从而被chrome拦截。</p>
<p>原文出处:<a href="原文">http://ifindever.com/archives/260.html</a></p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/webview/">webview</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/移动端/">移动端</a></li></ul>
</div>
<div class="article-category tagcloud">
<a class="article-category-link" href="/categories/javascript/">javascript</a>
</div>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-jq-stop" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/06/08/jq-stop/" class="article-date">
<time datetime="2016-06-08T07:27:00.000Z" itemprop="datePublished">2016-06-08</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/06/08/jq-stop/">jQuery stop() 一点笔记</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>jQuery 有个 stop() 能够停止动画队列。例如:<br><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag"><<span class="title">div</span> <span class="attribute">class</span>=<span class="value">"wrap"</span>></span></span><br><span class="line"> <span class="tag"><<span class="title">input</span> <span class="attribute">type</span>=<span class="value">"button"</span> <span class="attribute">value</span>=<span class="value">"运动"</span> <span class="attribute">id</span>=<span class="value">"btn1"</span>></span></span><br><span class="line"> <span class="tag"><<span class="title">input</span> <span class="attribute">type</span>=<span class="value">"button"</span> <span class="attribute">value</span>=<span class="value">"停止"</span> <span class="attribute">id</span>=<span class="value">"btn2"</span>></span></span><br><span class="line"> <span class="tag"><<span class="title">div</span> <span class="attribute">id</span>=<span class="value">"div1"</span>></span><span class="tag"></<span class="title">div</span>></span></span><br><span class="line"><span class="tag"></<span class="title">div</span>></span></span><br></pre></td></tr></table></figure></p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JQ/">JQ</a></li></ul>
</div>
<div class="article-category tagcloud">
<a class="article-category-link" href="/categories/javascript/">javascript</a>
</div>
<p class="article-more-link">
<a href="/2016/06/08/jq-stop/#more">more >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-JQ各种尺寸" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/06/04/JQ各种尺寸/" class="article-date">
<time datetime="2016-06-04T06:47:00.000Z" itemprop="datePublished">2016-06-04</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/06/04/JQ各种尺寸/">JQ各种尺寸笔记</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">$().width(); <span class="comment">// width</span></span><br><span class="line">$().innerWidth(); <span class="comment">// width+padding</span></span><br><span class="line">$().outerWidth(); <span class="comment">// width+padding+border</span></span><br><span class="line">$().outerWidth(<span class="literal">true</span>); <span class="comment">// width+padding+border+margin</span></span><br><span class="line"></span><br><span class="line">$().width(<span class="number">200</span>); <span class="comment">//设置宽度200</span></span><br><span class="line">$().innerWidth(<span class="number">200</span>); <span class="comment">//设置width+padding=200</span></span><br><span class="line">$().outerWidth(<span class="number">200</span>); <span class="comment">//设置width+padding+border=200</span></span><br><span class="line">$().innerWidth(<span class="number">200</span>, <span class="literal">true</span>); <span class="comment">//设置width+padding+border+margin=200</span></span><br></pre></td></tr></table></figure>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JQ/">JQ</a></li></ul>
</div>
<div class="article-category tagcloud">
<a class="article-category-link" href="/categories/javascript/">javascript</a>
</div>
<p class="article-more-link">
<a href="/2016/06/04/JQ各种尺寸/#more">more >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-es6" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/06/02/es6/" class="article-date">
<time datetime="2016-06-02T03:03:00.000Z" itemprop="datePublished">2016-06-02</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/06/02/es6/">ECMAscript6 学习小记</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h6 id="ECMAscript6_学习小记">ECMAscript6 学习小记</h6><p>需使用严格模式,否则在chrome下会报错 <code>use strict</code><br>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/es6/">es6</a></li></ul>
</div>
<div class="article-category tagcloud">
<a class="article-category-link" href="/categories/javascript/">javascript</a>
</div>
<p class="article-more-link">
<a href="/2016/06/02/es6/#more">more >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-zepto添加模块" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/05/23/zepto添加模块/" class="article-date">
<time datetime="2016-05-23T05:19:00.000Z" itemprop="datePublished">2016-05-23</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/05/23/zepto添加模块/">zepto添加模块</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>zepto是个好东西,遵循JQ api,但比JQ小巧很多,适合移动端web开发。<br>但他默认支持的模块只有 <code>zepto</code> <code>event</code> <code>ajax</code> <code>form</code> <code>ie</code>,但想touch模块,默认是不支持的,而移动端web又需要用到手势事件,所以我们可以给zepto添加我们需要的模块。<br>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/zepto/">zepto</a></li></ul>
</div>
<div class="article-category tagcloud">
<a class="article-category-link" href="/categories/随笔/">随笔</a>
</div>
<p class="article-more-link">
<a href="/2016/05/23/zepto添加模块/#more">more >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-double-click" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/04/29/double-click/" class="article-date">
<time datetime="2016-04-29T06:37:38.000Z" itemprop="datePublished">2016-04-29</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/04/29/double-click/">双击事件</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>很多JS库都提供了双击事件,但是如果不想用第三方库呢?其实也可以自己写,代码如下:<br><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> i = <span class="number">0</span>;</span><br><span class="line">$(<span class="built_in">document</span>).on(<span class="string">'click'</span>,<span class="function"><span class="keyword">function</span> (<span class="params"></span>)</span>{</span><br><span class="line"> i++;</span><br><span class="line"> setTimeout(<span class="function"><span class="keyword">function</span> (<span class="params"></span>)</span>{</span><br><span class="line"> i = <span class="number">0</span>;</span><br><span class="line"> },<span class="number">500</span>);</span><br><span class="line"> <span class="keyword">if</span>( i > <span class="number">1</span> ){</span><br><span class="line"> alert(<span class="string">'双击'</span>);</span><br><span class="line"> i = <span class="number">0</span>;</span><br><span class="line"> }</span><br><span class="line">});</span><br></pre></td></tr></table></figure></p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/双击/">双击</a></li></ul>
</div>
<div class="article-category tagcloud">
<a class="article-category-link" href="/categories/javascript/">javascript</a>
</div>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-jianpan" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/03/27/jianpan/" class="article-date">
<time datetime="2016-03-27T13:32:00.000Z" itemprop="datePublished">2016-03-27</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/03/27/jianpan/">移动端点击输入框被键盘遮挡的问题</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>做移动端wap页面的童鞋或多或少都会遇到<code>移动端点击输入框被键盘遮挡的问题</code>一般在安卓遇到的情况比较常见。<br>一开始也想不出解决方案,于是各种百度、谷歌,找到了一种方法:</p>
<blockquote>
<p>监控输入框的焦点事件,当输入框焦点时把整个页面向上拉,拉到可视区的一半就可以了。失去焦点时在拉回来。</p>
</blockquote>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/键盘遮挡/">键盘遮挡</a></li></ul>
</div>
<div class="article-category tagcloud">
<a class="article-category-link" href="/categories/移动端/">移动端</a>
</div>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-开启PHP环境" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/03/09/开启PHP环境/" class="article-date">
<time datetime="2016-03-09T02:01:00.000Z" itemprop="datePublished">2016-03-09</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/03/09/开启PHP环境/">开启PHP环境</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>说到PHP环境,大多数人会想到<code>wampserver</code>诸如此类的东西.今天要说的是在无论在哪个目录下都可以开启<code>php环境</code>,不用放到像<code>wampserver</code>的www目录底下。<br>例如:我现在有一个静态页项目,而里面需要测试接口,所以新建了个test.php之类的东西,但是如果为了测试一个接口就把整个目录迁移到www目录底下,会感觉比较麻烦,那么我们可以就在整个目录下开启php环境。具体怎么做呢?<br>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/PHP/">PHP</a></li></ul>
</div>
<div class="article-category tagcloud">
<a class="article-category-link" href="/categories/随笔/">随笔</a>
</div>
<p class="article-more-link">
<a href="/2016/03/09/开启PHP环境/#more">more >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<nav id="page-nav">
<span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="page-number" href="/page/3/">3</a><a class="extend next" rel="next" href="/page/2/">Next »</a>
</nav>
</div>
<footer id="footer">
<div class="outer">
<div id="footer-info">
<div class="footer-left">
© 2016 银狐
</div>
<div class="footer-right">
<a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/litten/hexo-theme-yilia" target="_blank">Yilia</a> by Litten
</div>
</div>
</div>
</footer>
</div>
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css">
<script>
var yiliaConfig = {
fancybox: true,
mathjax: true,
animate: true,
isHome: true,
isPost: false,
isArchive: false,
isTag: false,
isCategory: false,
open_in_new: false
}
</script>
<script src="http://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="/js/main.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
}
});
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for(i=0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</div>
</body>
</html>