-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1750 lines (842 loc) · 51.9 KB
/
index.html
File metadata and controls
1750 lines (842 loc) · 51.9 KB
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
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />
<link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />
<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />
<meta name="keywords" content="Hexo, NexT" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />
<meta property="og:type" content="website">
<meta property="og:title" content="xiezhuqing">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="xiezhuqing">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="xiezhuqing">
<script type="text/javascript" id="hexo.configurations">
var NexT = window.NexT || {};
var CONFIG = {
root: '/',
scheme: 'Pisces',
sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
fancybox: true,
motion: true,
duoshuo: {
userId: '0',
author: '博主'
},
algolia: {
applicationID: '',
apiKey: '',
indexName: '',
hits: {"per_page":10},
labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
}
};
</script>
<link rel="canonical" href="http://yoursite.com/"/>
<title> xiezhuqing </title>
</head>
<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">
<div class="container one-collumn sidebar-position-left
page-home
">
<div class="headband"></div>
<header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-brand-wrapper">
<div class="site-meta ">
<div class="custom-logo-site-title">
<a href="/" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<span class="site-title">xiezhuqing</span>
<span class="logo-line-after"><i></i></span>
</a>
</div>
<p class="site-subtitle"></p>
</div>
<div class="site-nav-toggle">
<button>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
</button>
</div>
</div>
<nav class="site-nav">
<ul id="menu" class="menu">
<li class="menu-item menu-item-home">
<a href="/" rel="section">
<i class="menu-item-icon fa fa-fw fa-home"></i> <br />
首页
</a>
</li>
<li class="menu-item menu-item-categories">
<a href="/categories" rel="section">
<i class="menu-item-icon fa fa-fw fa-th"></i> <br />
分类
</a>
</li>
<li class="menu-item menu-item-about">
<a href="/about" rel="section">
<i class="menu-item-icon fa fa-fw fa-user"></i> <br />
关于
</a>
</li>
<li class="menu-item menu-item-archives">
<a href="/archives" rel="section">
<i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
归档
</a>
</li>
<li class="menu-item menu-item-tags">
<a href="/tags" rel="section">
<i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
标签
</a>
</li>
<li class="menu-item menu-item-baby">
<a href="/baby" rel="section">
<i class="menu-item-icon fa fa-fw fa-heart"></i> <br />
谢朱青
</a>
</li>
</ul>
</nav>
</div>
</header>
<main id="main" class="main">
<div class="main-inner">
<div class="content-wrap">
<div id="content" class="content">
<section id="posts" class="posts-expand">
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/03/31/谢涛模拟面试/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="John Doe">
<meta itemprop="description" content="">
<meta itemprop="image" content="/images/avatar.gif">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="xiezhuqing">
</span>
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/03/31/谢涛模拟面试/" itemprop="url">
未命名
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建于" itemprop="dateCreated datePublished" datetime="2017-03-31T22:34:28+08:00">
2017-03-31
</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h2 id="1-ajax执行过程"><a href="#1-ajax执行过程" class="headerlink" title="1.ajax执行过程"></a>1.ajax执行过程</h2><p>1)执行过程</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div></pre></td><td class="code"><pre><div class="line">(1)创建XMLHttpRequest对象,也就是创建一个异步调用对象.</div><div class="line"></div><div class="line">(2)创建一个新的HTTP请求,并指定该HTTP请求的方式、URL及验证信息.</div><div class="line"></div><div class="line">(3)设置响应HTTP请求状态变化的函数.</div><div class="line"></div><div class="line">(4)发送HTTP请求.</div><div class="line"></div><div class="line">(5)获取异步调用返回的数据.</div><div class="line"></div><div class="line">(6)使用JavaScript和DOM实现局部刷新.</div></pre></td></tr></table></figure>
<p>2)’get’和’post’方式的区别</p>
<p>Get和Post在客户端的区别。</p>
<ul>
<li>GET方式会在url地址后面进行传递,而post会作为HTTP请求的消息实体中进行传送</li>
<li>GET传递的数据量为1024字节,POST方式传输的数据量就会大很多</li>
<li>GET传输的数据在url中是可见的,而且会被浏览器缓存起来,存在安全隐患。</li>
</ul>
<p>一般情况下,请求数据无副作用,比如进行搜索时可以使用get请求,当请求有副作用时,比如有数据添加时需要使用post请求。</p>
<h3 id="2-对闭包的理解和作用"><a href="#2-对闭包的理解和作用" class="headerlink" title="2.对闭包的理解和作用"></a>2.对闭包的理解和作用</h3><p>1)什么是闭包</p>
<p><strong>「函数」和「函数内部能访问到的变量」(也叫环境)的总和,就是一个闭包。</strong></p>
<p>至于为什么需要还要在外面再套一层函数,是为了使用闭包的目则是为了构建一个局部作用域,好隐藏变量.</p>
<p>再利用内函数能访问上级作用域变量的特性,获取外函数中的变量,通过内函数的return,赋值给Windows的函数来间接读取修改变量.所以我觉得闭包是 JS 函数作用域的副产品.</p>
<p>2)闭包的优点</p>
<ul>
<li>自执行函数也就是沙箱,所以由于其内部都是局部变量,不会造成全部变量污染。</li>
<li>进行缓存, 将内部函数或者对象返回出来后。</li>
<li></li>
</ul>
<p>3)闭包的缺点</p>
<ul>
<li>内存泄漏</li>
<li>性能问题</li>
</ul>
<h2 id="3-浏览器本地存储"><a href="#3-浏览器本地存储" class="headerlink" title="3.浏览器本地存储"></a>3.浏览器本地存储</h2><p>在较高版本的浏览器中,<code>js</code>提供了<code>sessionStorage</code>和<code>globalStorage</code>。在<code>HTML5</code>中提供了<code>localStorage</code>来取代<code>globalStorage</code>。</p>
<p><code>Html5</code>中的<code>Web Storage</code>包括了两种存储方式:<code>sessionStorage</code>和<code>localStorage</code>。</p>
<p><code>sessionStorage</code>用于本地存储一个会话(session)中的数据,这些数据只有在同一个会话中的页面才能访问并且当会话结束后数据也随之销毁。因此<code>sessionStorage</code>不是一种持久化的本地存储,仅仅是会话级别的存储。</p>
<p>而<code>localStorage</code>用于持久化的本地存储,除非主动删除数据,否则数据是永远不会过期的</p>
<h3 id="4-css3和H5的新特性"><a href="#4-css3和H5的新特性" class="headerlink" title="4.css3和H5的新特性"></a>4.css3和H5的新特性</h3><p>1.首先H5是个不只是指的是html5,而是指html,css3,javascript的集成开发环境</p>
<p>2.HTML5部分</p>
<ul>
<li><p>新的语义化标签,例如header,section,footer等等</p>
</li>
<li><p>新的输入类型</p>
</li>
<li><p>音频audio,视频video标签</p>
</li>
<li><p>有点类似于jquery的新的dom元素获取方式,querySelector,querySelectorAll</p>
</li>
<li><p>同样类似于jquery的类名操作</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">div.classList.add(<span class="string">"orange"</span>)添加类</div><div class="line">div.classList.remove(<span class="string">"orange"</span>)移除类</div><div class="line">div.classList.contains(<span class="string">"orange"</span>)是否有某个类</div><div class="line">div.classList.toggle(<span class="string">"orange"</span>)切换类</div></pre></td></tr></table></figure>
</li>
<li><p>自定义属性一data开头的,是的自定义属性命名比较规范</p>
</li>
<li>浏览器存储方式:localstorage,sessionstorage 使用方法基本一致。</li>
</ul>
<p>3.css3部分:常见属性兼容性不错,不兼容的可以使用相应的前缀</p>
<ul>
<li><p>css3选择器</p>
<p>基本选择器,属性选择器等等</p>
<p>伪类选择器:nth-child()这些</p>
<p>伪元素选择器:::first-letter这些</p>
</li>
<li><h3 id="文字阴影-text-shoadow-x-y-阴影-color"><a href="#文字阴影-text-shoadow-x-y-阴影-color" class="headerlink" title="文字阴影:text-shoadow: x y 阴影 color"></a>文字阴影:text-shoadow: x y 阴影 color</h3></li>
<li><p>盒子阴影:box-shoadow: 发散方向(inset向内) x y 模糊 放大 color;模糊 放大可以省略</p>
</li>
<li><p>背景:</p>
<ol>
<li>background-size :width height;指定固定大小 contain;自适应;cover;强行等比例覆盖</li>
<li>background-image:url,url;多重背景图片</li>
<li>background-origin: border-box;content-box;padding-box;</li>
<li>background-clip:border-box;xontent-box;padding-box;之外的区域裁剪掉</li>
</ol>
</li>
<li><p>渐变:线性渐变,径向渐变</p>
<h3 id="5-对angular框架的认识"><a href="#5-对angular框架的认识" class="headerlink" title="5.对angular框架的认识"></a>5.对angular框架的认识</h3><p>1.angular基本认识</p>
<ul>
<li>angular不推崇dom操作,但内部肯定也是有dom操作的</li>
<li>angular的双向数据绑定与Vue是不同的,angular是自己 重新写了一套编译规则来实现的,简单说使用“脏”检查来实现的,而vue是使用的es5中的getter和setter方法来实现的,故而vue的双向数据绑定效率更高,但是兼容性略差</li>
</ul>
<p>2.angular的优势</p>
<ul>
<li>JQ提高了操作DOM的开发效率,能够节省很多代码。</li>
<li>NG几乎没有任何DOM操作(不是没有,只是不用我们自己操作)</li>
<li>NG内置一个类似JQ的东西<code>angular.element()</code></li>
<li>Angular 不提倡DOM操作,如果必须使用DOM的话,也不建议再去引用jquery,有内置</li>
</ul>
<p>3.使用angular开发的流程</p>
<ul>
<li>使用npm或者直接下载angular.js到本地并运用。</li>
<li>在js代码中通过Angular.module(‘myApp’,[]);定义一个模块。</li>
<li>在html中使用ng-app=‘myApp’引用刚才定义的模块。</li>
<li>根据当前页面情况进行划分控制</li>
<li>在html中通过ng-controller=’myController’作用到特定元素上</li>
<li>在js中通过$scope来暴露需要作用到页面中的数据</li>
<li>在html通过ng-model或者ng-click等指令将$scope暴露出来的指令作用到页面元素中去。</li>
</ul>
</li>
</ul>
</div>
<div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/03/18/哈佛幸福课/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="John Doe">
<meta itemprop="description" content="">
<meta itemprop="image" content="/images/avatar.gif">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="xiezhuqing">
</span>
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/03/18/哈佛幸福课/" itemprop="url">
哈佛幸福课
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建于" itemprop="dateCreated datePublished" datetime="2017-03-18T18:24:46+08:00">
2017-03-18
</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h4 id="哈佛幸福课ep6"><a href="#哈佛幸福课ep6" class="headerlink" title="哈佛幸福课ep6"></a>哈佛幸福课ep6</h4><p>1:视觉化自己想要的样子,要详细生动,想象自己努力去做的样子,因为大脑无法区分真实和生动的想象,例如你眼睛看着你的手和你在大脑中想象着你的手时,激活的是大脑中同一块神经区域。大脑不喜欢不一致性(inconsistency),我们只要想象着自己成熟,镇定,自信,就有可能在现实中让自己变成你脑中所想象的样子。</p>
<h4 id="哈佛幸福课ep7"><a href="#哈佛幸福课ep7" class="headerlink" title="哈佛幸福课ep7"></a>哈佛幸福课ep7</h4><p>1.认知疗法(recognize therapy):人的认知过程大概是这样的,可以简称为3E模型,即Event–>Evaluation(thought)–>Emotion==>action.认知疗法认为我们能干预的只有Evaluation(thought),也就是说,发生了什么我们和对于某种的想法产生的情绪(Emotion)是无法改变的,对于一件事要尽量以正面的想法来衡量它</p>
</div>
<div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/03/18/谢涛面试题/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="John Doe">
<meta itemprop="description" content="">
<meta itemprop="image" content="/images/avatar.gif">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="xiezhuqing">
</span>
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/03/18/谢涛面试题/" itemprop="url">
谢涛面试题
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建于" itemprop="dateCreated datePublished" datetime="2017-03-18T18:22:22+08:00">
2017-03-18
</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>在较高版本的浏览器中,js提供了sessionStorage和globalStorage。在HTML5中提供了localStorage来取代globalStorage。</p>
</div>
<div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/03/05/笔记/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="John Doe">
<meta itemprop="description" content="">
<meta itemprop="image" content="/images/avatar.gif">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="xiezhuqing">
</span>
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/03/05/笔记/" itemprop="url">
未命名
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建于" itemprop="dateCreated datePublished" datetime="2017-03-05T21:34:49+08:00">
2017-03-05
</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h1 id="流行框架第2天"><a href="#流行框架第2天" class="headerlink" title="流行框架第2天"></a>流行框架第2天</h1><h2 id="git使用ssh方式上传代码与github"><a href="#git使用ssh方式上传代码与github" class="headerlink" title="git使用ssh方式上传代码与github"></a>git使用ssh方式上传代码与github</h2><ul>
<li>git生成公钥和私钥<ul>
<li>命令:<code>ssh-keygen -t rsa</code>生成的公钥与私钥文件会在当用户目录的.ssh目录下.</li>
</ul>
</li>
</ul>
<h3 id="把代码push到服务器时需要先pull一下"><a href="#把代码push到服务器时需要先pull一下" class="headerlink" title="把代码push到服务器时需要先pull一下"></a>把代码push到服务器时需要先pull一下</h3><ul>
<li>在pull之后如果远程的代码与本地的代码有冲突,git会先自动合并冲突,如果不能自动合并,就必需我们手动去处理冲突。</li>
</ul>
<h3 id="从服务器上pull代码到本地"><a href="#从服务器上pull代码到本地" class="headerlink" title="从服务器上pull代码到本地"></a>从服务器上pull代码到本地</h3><ul>
<li>如果本地没有.git目录,需要先初始化一下。</li>
<li>命令:<code>git pull [远程服务器地址] [远程的分支]</code></li>
</ul>
<h3 id="gh-pages分支-搭建博客"><a href="#gh-pages分支-搭建博客" class="headerlink" title="gh-pages分支-搭建博客."></a>gh-pages分支-搭建博客.</h3><ul>
<li>需要把自已博客的网页代码上传到github上的gh-pages分支</li>
<li>然后就直接访问了<ul>
<li>访问的url形式: [github用户名].github.io/[仓库的名字]/[具体的页面]</li>
</ul>
</li>
</ul>
<h3 id="sourceTree-tortoiseGit"><a href="#sourceTree-tortoiseGit" class="headerlink" title="sourceTree , tortoiseGit"></a>sourceTree , tortoiseGit</h3><h3 id="npm"><a href="#npm" class="headerlink" title="npm"></a>npm</h3><ul>
<li>官网[<a href="https://www.npmjs.com" target="_blank" rel="external">https://www.npmjs.com</a>]</li>
<li>node package manager</li>
<li>命令:<ul>
<li>初始化:<code>npm init</code></li>
<li>安装指定包:<code>npm install jquery --save</code></li>
<li>删除指定包:<code>npm remove jquery --save</code></li>
<li>下载安装package.json中dependencies属性对的文件:<code>npm install --production</code></li>
</ul>
</li>
</ul>
<h3 id="browser-sync"><a href="#browser-sync" class="headerlink" title="browser-sync"></a>browser-sync</h3><ul>
<li>更改代码之后自动刷新浏览器</li>
<li>需要使用npm进行全局安装:<code>npm install browser-sync -g</code>,-g表示安装到全局</li>
<li>使用:<code>browser-sync start --server --files "./index.html,app.css,./css/*.css,*.*"</code></li>
<li>–files参数指定要监视的文件,后面跟要监视的文件的文件路径以逗号分隔。</li>
</ul>
<h2 id="gulp"><a href="#gulp" class="headerlink" title="gulp"></a>gulp</h2><p> <a href="http://www.gulpjs.com" target="_blank" rel="external">官网</a><br> <a href="http://www.gulpjs.com.cn" target="_blank" rel="external">中文网</a></p>
<ul>
<li><p>前端自动化构建工具<br>js压缩,var x,xname,混淆<br>合并.<br>css压缩<br>html压压缩</p>
</li>
<li><p>grunt ,webpack…</p>
</li>
</ul>
<h3 id="核心就5个方法"><a href="#核心就5个方法" class="headerlink" title="核心就5个方法"></a>核心就5个方法</h3><ul>
<li>task,gulp中是一个个任务的形式来实现功能。<ul>
<li>task(‘任务名’,function(){<br>…..<br>});</li>
</ul>
</li>
<li>src<ul>
<li>src(‘./*.js’)</li>
</ul>
</li>
<li>dest(‘./minjs/‘)// 指定处理后的文件的输出路径.</li>
<li>watch(‘./*.js’,[‘任务名1’,’任务名2’]);</li>
<li>run(‘任务名’);//执行指定的任务.</li>
</ul>
<h3 id="gulp的安装"><a href="#gulp的安装" class="headerlink" title="gulp的安装"></a>gulp的安装</h3><ul>
<li>使用npm 进行安装</li>
<li><code>npm install gulp-cli -g</code>;</li>
</ul>
<h3 id="gulp-使用"><a href="#gulp-使用" class="headerlink" title="gulp 使用"></a>gulp 使用</h3><h4 id="使用时还需要在项目中通过npm非全局安装gulp"><a href="#使用时还需要在项目中通过npm非全局安装gulp" class="headerlink" title="使用时还需要在项目中通过npm非全局安装gulp"></a>使用时还需要在项目中通过npm非全局安装gulp</h4><ul>
<li><code>npm install gulp --save-dev</code></li>
</ul>
<h4 id="还需要在当前项目根目录添加一个gulpfile-js文件来写具体的任务代码"><a href="#还需要在当前项目根目录添加一个gulpfile-js文件来写具体的任务代码" class="headerlink" title="还需要在当前项目根目录添加一个gulpfile.js文件来写具体的任务代码."></a>还需要在当前项目根目录添加一个gulpfile.js文件来写具体的任务代码.</h4><h3 id="gulp的一些插件"><a href="#gulp的一些插件" class="headerlink" title="gulp的一些插件"></a>gulp的一些插件</h3><ul>
<li>也是使用npm安装</li>
<li>对js代码进行压缩 gulp-uglify</li>
<li>对代码进行合并 gulp-concat</li>
<li>对css进行压缩 gulp-cssnano</li>
<li>对html进行压缩 gulp-htmlmin</li>
</ul>
</div>
<div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/03/01/01/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="John Doe">
<meta itemprop="description" content="">
<meta itemprop="image" content="/images/avatar.gif">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="xiezhuqing">
</span>
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/03/01/01/" itemprop="url">
未命名
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建于" itemprop="dateCreated datePublished" datetime="2017-03-01T10:18:56+08:00">
2017-03-01
</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h1 id="框架-第01天-框架介绍与选择器框架"><a href="#框架-第01天-框架介绍与选择器框架" class="headerlink" title="框架-第01天-框架介绍与选择器框架"></a>框架-第01天-框架介绍与选择器框架</h1><h2 id="jQuery框架介绍"><a href="#jQuery框架介绍" class="headerlink" title="jQuery框架介绍"></a>jQuery框架介绍</h2><h3 id="jQuery的整体结构"><a href="#jQuery的整体结构" class="headerlink" title="jQuery的整体结构"></a>jQuery的整体结构</h3><blockquote>
<p>jQuery是模块化. 是一个以代码集合与功能为中心的模块.</p>
</blockquote>
<pre><code>(function ( window, undefined ) {
// ...
})( window );
1.沙箱模式 减少全局变量
2.传入window只将jQuery和$暴露供外界使用
</code></pre><h3 id="核心介绍"><a href="#核心介绍" class="headerlink" title="核心介绍"></a>核心介绍</h3><pre><code>jQuery.extend = jQuery.fn.extend = function( obj ) {
for ( var k in obj ) {