-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
935 lines (878 loc) · 30.5 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>资生堂官网</title>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- 可选的 Bootstrap 主题文件(一般不用引入) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<link rel="stylesheet" href="css/iconfont.css">
<link rel="stylesheet" href="css/index.css">
</head>
<body>
<a class="top">
<span class="iconfont icon-top"></span>
</a>
<!-- nav -->
<div class="header">
</div>
<!-- banner -->
<div class="banner">
<div class="boxImg">
<a href="#"><img src="img/banner04.jpg" alt="" style="display:block"></a>
<a href="#"><img src="img/banner03.jpg" alt=""></a>
<a href="#"><img src="img/banner02.jpg" alt=""></a>
<a href="waso.html"><img src="img/banner01.jpg" alt=""></a>
</div>
<ul class="doudou">
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<div class="arrow left" id="left">
<span class="iconfont icon-icon-arrow-left"></span>
</div>
<div class="arrow right" id="right">
<span class="iconfont icon-arrow-right"></span>
</div>
</div>
<!-- skincare -->
<div class="skincare">
<div class="contentLeft">
<div class="contentLeftInner">
<div class="leftInner">
<h1>护肤</h1>
<div class="leftTop">
<a href="#">
查看详情
<span></span>
</a>
</div>
</div>
<h2>明星单品「傲娇精华」<br>
更强,抵御内外压力<br>
更快,修护肌肤损伤</h2>
<div class="skc_link">
<a href="#">了解更多</a>
</div>
</div>
</div>
<div class="contentRight">
<a href="#"><img src="img/img1.jpg" alt=""></a>
</div>
</div>
<!-- 人气护肤星品 -->
<div class="skin_news">
<h3 class="title">人气护肤星品</h3>
<div class="slick_list">
<!-- <form action="" method="post"> -->
<div class="img img1">
<p>
<a href="#"></a>
<span class="iconfont icon-wishlist"></span>
</p>
<div class="contain">
<a href="#"><img src="img/img2.jpg" alt=""></a>
</div>
<span class="goodsId" style="display: none;">001</span>
<div class="productName">
<a href="#">
<h5>
<p>盼丽风姿</p>
<p>智感抚痕乳霜</p>
</h5>
</a>
</div>
<div class="productPrice">
<h2>¥690 / 50mL(抚痕乳霜)</h2>
<a href="#">购买</a>
</div>
<div class="cover">
<p>
<a href="#"></a>
<span class="iconfont icon-wishlist"></span>
</p>
<div class="contain">
<a href="#"><img src="img/img2_1.jpg" alt=""></a>
</div>
<div class="productName">
<a href="#">
<h5>
<p>盼丽风姿</p>
<p>智感抚痕乳霜</p>
</h5>
</a>
</div>
<div class="productPrice">
<h2>¥690 / 50mL(抚痕乳霜)</h2>
<a href="#">购买</a>
</div>
<div class="selectDiv dropup">
<form action="">
<select name="goodsCount" id="num">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
<select name="" id="pro">
<option value="0">选择</option>
<option value="50mL(抚痕乳霜)" selected>50mL(抚痕乳霜)</option>
<option value="50mL(抚痕霜-滋润型)">50mL(抚痕霜-滋润型)</option>
</select>
<a class="addShopCart" style="cursor: pointer;">购买</a>
</form>
</div>
</div>
</div>
<!-- </form> -->
<div class="img img3">
<p>
<a href="#"></a>
<span class="iconfont icon-wishlist"></span>
</p>
<div class="contain">
<a href="#"><img src="img/img3.jpg" alt=""></a>
</div>
<span class="goodsId" style="display: none;">002</span>
<div class="productName">
<a href="#">
<h5>
<p>盼丽风姿</p>
<p>智感抚痕精华液</p>
</h5>
</a>
</div>
<div class="productPrice">
<h2>¥690 / 30mL</h2>
<a href="#">购买</a>
</div>
<div class="cover">
<p>
<a href="#"></a>
<span class="iconfont icon-wishlist"></span>
</p>
<div class="contain">
<a href="#"><img src="img/img3_1.jpg" alt=""></a>
</div>
<div class="productName">
<a href="#">
<h5>
<p>盼丽风姿</p>
<p>智感抚痕精华液</p>
</h5>
</a>
</div>
<div class="productPrice">
<h2>¥690 / 30mL</h2>
<a href="#">购买</a>
</div>
<div class="selectDiv dropup">
<form action="">
<select name="goodsCount" id="num">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
<select name="" id="pro">
<option value="30mL" selected>30mL</option>
</select>
<a class="addShopCart" style="cursor: pointer;">购买</a>
</form>
</div>
</div>
</div>
<div class="img img5">
<p>
<a href="#"></a>
<span class="iconfont icon-wishlist"></span>
</p>
<div class="contain">
<a href="#"><img src="img/img4.jpg" alt=""></a>
</div>
<span class="goodsId" style="display: none;">003</span>
<div class="productName">
<a href="#">
<h5>
<p>盼丽风姿</p>
<p>智感抚痕眼霜</p>
</h5>
</a>
</div>
<div class="productPrice">
<h2>¥490 / 15mL</h2>
<a class="addShopCart" style="cursor: pointer;">购买</a>
</div>
<div class="cover">
<p>
<a href="#"></a>
<span class="iconfont icon-wishlist"></span>
</p>
<div class="contain">
<a href="#"><img src="img/img4.jpg" alt=""></a>
</div>
<div class="productName">
<a href="#">
<h5>
<p>盼丽风姿</p>
<p>智感抚痕眼霜</p>
</h5>
</a>
</div>
<div class="productPrice">
<h2>¥490 / 15mL</h2>
<a class="addShopCart" style="cursor: pointer;">购买</a>
</div>
<div class="selectDiv dropup">
<form action="">
<select name="" id="num">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
<select name="" id="pro">
<option value="15mL" selected>15mL</option>
</select>
<a class="addShopCart" style="cursor: pointer;">购买</a>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- 彩妆 -->
<div class="makeup">
<div class="boxLeft">
<a href="#"><img src="img/img5.jpg" alt=""></a>
</div>
<div class="boxRight">
<div class="boxRightInner">
<div class="rightInner">
<h1>彩妆</h1>
<div class="rightTop">
<a href="#">查看详情
<span></span>
</a>
</div>
</div>
<h2>妆若无感<br>
轻盈质地 X 浓郁色彩</h2>
<div class="skc_link">
<a href="#">了解更多</a>
</div>
</div>
</div>
</div>
<!-- 智能底妆 -->
<div class="total_count">
<h3 class="title">“智能”底妆家族</h3>
<div class="slick_list">
<div class="img img2">
<p>
<a href="#"></a>
<span class="iconfont icon-wishlist"></span>
</p>
<div class="contain">
<a href="#"><img src="img/img6.jpg" alt=""></a>
</div>
<div class="productName">
<a href="#">
<h5>
<p>随肌应变</p>
<p>光透粉底液</p>
</h5>
</a>
</div>
<div class="productPrice">
<h2>¥420 / 30mL</h2>
<a href="#">购买</a>
</div>
<div class="cover">
<p>
<a href="#"></a>
<span class="iconfont icon-wishlist"></span>
</p>
<div class="contain">
<a href="#"><img src="img/img6_1.jpg" alt=""></a>
</div>
<div class="productName">
<a href="#">
<h5>
<p>随肌应变</p>
<p>光透粉底液</p>
</h5>
</a>
</div>
<div class="productPrice">
<h2>¥420 / 30mL</h2>
<a href="#">购买</a>
</div>
<div class="selectDiv dropup">
<form action="">
<select name="" id="num">
<option value="">1</option>
<option value="">2</option>
<option value="">3</option>
<option value="">4</option>
<option value="">5</option>
<option value="">6</option>
</select>
<a href="#">购买</a>
</form>
</div>
</div>
</div>
<div class="img img4">
<p>
<a href="#"></a>
<span class="iconfont icon-wishlist"></span>
</p>
<div class="contain">
<a href="#"><img src="img/img7.jpg" alt=""></a>
</div>
<div class="productName">
<a href="#">
<h5>
<p>随肌应变</p>
<p>气垫粉底液</p>
</h5>
</a>
</div>
<div class="productPrice">
<h2>¥320 / 12g</h2>
<a href="#">购买</a>
</div>
<div class="cover">
<p>
<a href="#"></a>
<span class="iconfont icon-wishlist"></span>
</p>
<div class="contain">
<a href="#"><img src="img/img7_1.jpg" alt=""></a>
</div>
<div class="productName">
<a href="#">
<h5>
<p>随肌应变</p>
<p>气垫粉底液</p>
</h5>
</a>
</div>
<div class="productPrice">
<h2>¥320 / 12g</h2>
<a href="#">购买</a>
</div>
<div class="selectDiv dropup">
<form action="">
<select name="" id="num">
<option value="">1</option>
<option value="">2</option>
<option value="">3</option>
<option value="">4</option>
<option value="">5</option>
<option value="">6</option>
</select>
<a href="#">购买</a>
</form>
</div>
</div>
</div>
<div class="img img6">
<p>
<a href="#"></a>
<span class="iconfont icon-wishlist"></span>
</p>
<div class="contain">
<a href="#"><img src="img/img8.jpg" alt=""></a>
</div>
<div class="productName">
<a href="#">
<h5>
<p>随肌应变</p>
<p>修颜乳</p>
</h5>
</a>
</div>
<div class="productPrice">
<h2>¥380 / 40mL</h2>
<a href="#">购买</a>
</div>
<div class="cover">
<p>
<a href="#"></a>
<span class="iconfont icon-wishlist"></span>
</p>
<div class="contain">
<a href="#"><img src="img/img8_1.jpg" alt=""></a>
</div>
<div class="productName">
<a href="#">
<h5>
<p>随肌应变</p>
<p>修颜乳</p>
</h5>
</a>
</div>
<div class="productPrice">
<h2>¥380 / 40mL</h2>
<a href="#">购买</a>
</div>
<div class="selectDiv dropup">
<form action="">
<select name="" id="num">
<option value="">1</option>
<option value="">2</option>
<option value="">3</option>
<option value="">4</option>
<option value="">5</option>
<option value="">6</option>
</select>
<a href="#">购买</a>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- 防晒 -->
<div class="sunblock">
<div class="contentLeft">
<div class="contentLeftInner">
<div class="leftInner">
<h1>防晒</h1>
<div class="leftTop">
<a href="#">查看详情
<span></span>
</a>
</div>
</div>
<h2>“智能”黑科技<br>
四重防晒力</h2>
<div class="skc_link">
<a href="#">了解更多</a>
</div>
</div>
</div>
<div class="contentRight">
<a href="#"><img src="img/img9_1.jpg" alt=""></a>
<a href="#"><img src="img/img9_2.jpg" alt=""></a>
<a href="#"><img src="img/img9_3.jpg" alt=""></a>
</div>
</div>
<!-- 肌肤测试 -->
<div class="skintest">
<div class="imgBg">
<img src="img/background04.jpg" alt="">
</div>
<div class="imgTest">
<div class="image">
<img src="img/img10.jpg" alt="">
</div>
<div class="test">
<div class="headline">
<span>「肌肤测试」<br>
定制你的专属美力方案
</span>
</div>
<div class="intro">
<span>
简单四步了解你的肌肤,并为你推荐适合的产品。<br>
肌肤的美力,不止于表面!
</span>
</div>
<a href="#" class="button">立即测试</a>
</div>
</div>
</div>
<!-- 品牌资讯 -->
<div class="corner">
<div class="cornerSpan">
<a href="#">品牌资讯
<span></span>
</a>
</div>
<div class="article">
<div class="articleDetail">
<div class="articleTit">妆若无感,资生堂彩妆新定义</div>
<div class="articleMain">资生堂品牌全新彩妆系列上市发布会,开启“妆若无感”全新空间。</div>
<a href="#" class="articleLink">
查看文章
<span class="iconfont icon-right-arrow1"></span>
</a>
</div>
<div class="articleImg">
<img src="img/img11.jpg" alt="">
</div>
</div>
<div class="articleBg">
<img src="img/background05.jpg" alt="">
</div>
</div>
<!-- 热门文章 -->
<div class="tags">
<div class="tagsBox">
<h3><a href="#">微博热门文章</a></h3>
<ul>
<div class="tag1">
<li>
<a href="#"><img src="img/li01.jpg" alt=""></a>
</li>
<li>
<a href="#"><img src="img/li02.jpg" alt=""></a>
</li>
<li>
<a href="#"><img src="img/li03.jpg" alt=""></a>
</li>
<li>
<a href="#"><img src="img/li04.jpg" alt=""></a>
</li>
</div>
<div class="tag1">
<li>
<a href="#"><img src="img/li05.jpg" alt=""></a>
</li>
<li>
<a href="#"><img src="img/li06.jpg" alt=""></a>
</li>
<li>
<a href="#"><img src="img/li07.jpg" alt=""></a>
</li>
<li>
<a href="#"><img src="img/li08.jpg" alt=""></a>
</li>
</div>
<div class="tag1">
<li>
<a href="#"><img src="img/li09.jpg" alt=""></a>
</li>
<li>
<a href="#"><img src="img/li10.jpg" alt=""></a>
</li>
<li>
<a href="#"><img src="img/li11.jpg" alt=""></a>
</li>
</div>
</ul>
<div class="scroll">
<div class="_a a1"></div>
<div class="_a"></div>
<div class="_a"></div>
</div>
<div class="counter">
<span class="page">01</span><span>03</span>
</div>
</div>
</div>
<!-- 底部 -->
<div class="footer">
<div class="lay1">
<div class="row">
<div class="col-md-4">
<div class="title">
<h3>联系我们</h3>
</div>
<div class="contains">
<a href="#" class="chat">
<i class="iconfont icon-chat"></i>
<span>在线咨询</span>
</a>
<a href="#" class="tel">
<i class="iconfont icon-phone"></i>
<span>400-821-6076</span>
</a>
</div>
</div>
<div class="col-md-4">
<div class="title">
<h3>关注我们</h3>
</div>
<div class="contains">
<a href="#" class="wechat">
<i class="iconfont icon-we-chat"></i>
</a>
<a href="#" class="weibo">
<i class="iconfont icon-weibo"></i>
</a>
<a href="#" class="redbook">
<i class="iconfont icon-xiaohongshu"></i>
</a>
</div>
</div>
<div class="col-md-4">
<div class="title">
<h3>寻找专柜</h3>
</div>
<div class="contains">
<a href="#" class="home">
<i class="iconfont icon-home"></i>
<span>专柜查询</span>
</a>
</div>
</div>
</div>
</div>
<div class="lay2">
<div class="row">
<div class="col-md-4">
<div class="contains">
<h5>关于我们</h5>
<ul>
<li>
<a href="#">品牌故事</a>
</li>
<li>
<a href="#">官网购物理由</a>
</li>
<li>
<a href="#">品牌资讯</a>
</li>
</ul>
</div>
</div>
<div class="col-md-4">
<div class="contains">
<h5>明星产品</h5>
<ul>
<li>
<a href="#">查看所有</a>
</li>
<li>
<a href="#">「傲娇精华」红妍肌活精华露</a>
</li>
<li>
<a href="#">「蓝胖子」新艳阳夏臻效水动力防晒乳</a>
</li>
<li>
<a href="#">「细管唇膏」沁色绚彩唇膏</a>
</li>
</ul>
</div>
</div>
<div class="col-md-4">
<div class="contains">
<h5>帮助中心</h5>
<ul>
<li>
<a href="#">常见问题</a>
</li>
<li>
<a href="#">退换货政策</a>
</li>
<li>
<a href="#">订单查询</a>
</li>
<li>
<a href="#">网站地图</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="lay3">
<a href="https://www.shiseido.com.cn/terms-of-use.html">使用条款</a>
<a href="https://www.shiseido.com.cn/privacy-policy.html">隐私政策</a>
<a href="https://www.shiseido.com.cn/license.html">上海工商</a>
<a href="http://www.beian.miit.gov.cn/state/outPortal/loginPortal.action;jsessionid=HYQG0rZBcOGhUvypcwqtPI3ahZUmkwGDDhKPyb2_P6hwwEn8UwU4!821559948">沪ICP备10203872号-1</a>
<a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31011502007430">沪公网安备 31011502007430号</a>
<span>Copyright © 2019 资生堂(中国)投资有限公司</span>
</div>
</div>
</body>
</html>
<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery,所以必须放在前边) -->
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.js"></script>
<script src="js/nav.js"></script>
<!-- 轮播图 -->
<script type="text/javascript">
var i=0,timer;
var sum = $(".boxImg a").length;
$(function(){
$(".boxImg a img").eq(i).show();
$(".boxImg a,.arrow").hover(function(){
clearInterval(timer);
},function(){
iLunbo();
})
iLunbo();
// $(".arrow").hover(function(){
// clearInterval(timer);
// });
/*左箭头控制轮播*/
$("#left").click(function(){
clearInterval(timer);
if(i==0){
i=sum;
}
i--;
startLunbo();
iLunbo();
});
/*右箭头控制轮播*/
$("#right").click(function(){
clearInterval(timer);
if(i==sum-1){
i=-1;
}
i++;
startLunbo();
iLunbo();
});
/*提示信息变换*/
$(".doudou>li").click(function(){
clearInterval(timer);
i=$(this).index();
console.log(i);
startLunbo();
});
})
// 自动轮播
function iLunbo(){
timer = setInterval(function(){
i++;
if(i==sum){
i=0;
}
startLunbo();
},3000)
}
//图片轮播及提示
function startLunbo(){
if(i==4){
i=0;
}
$(".doudou li").eq(i).css({
background:'black',
border:'none'
}).siblings().css({
background:'transparent',
border:'2px solid #ccc'
})
$(".boxImg a img").fadeOut();
$(".boxImg a img").eq(i).fadeIn();
}
</script>
<!-- 导航条 -->
<script>
var h = 0,t=0;
$(document).scroll(function(){
h = $(document).scrollTop();
setTimeout(function(){ t=h; },0);
if((h<t) && (h>650)){
$(".navMain").css({
position:'fixed',
top:'0',
zIndex:'99'
});
$(".login").css({
position:'fixed',
top:'100px',
zIndex:'99'
});
$(".icon-top").show()
}else if(h<650){
$(".navMain").css({
position:'relative'
});
$(".login").css({
position:'absolute'
});
$(".icon-top").hide()
}else{
$(".navMain").css({
position:'relative'
});
$(".icon-top").show()
}
})
</script>
<!-- 关闭nav -->
<script>
$(function(){
$(".icon-close").click(function(){
$(".box").css({display: 'none'})
})
})
</script>
<!-- 小轮播 -->
<script>
$(function(){
//获取滚动条的所有div
var oDiv = $("._a");
//获取所有图片的盒子
var oTag = $(".tag1");
//点击滚动条任意位置
$("._a").click(function(){
//让其他的class名消失
$("._a").removeClass("a1");
//给当前的div加class名
$(this).addClass("a1");
//改变页码
$(".page").html("0"+parseInt($(this).index()+1));
//让所取下标的图片盒子
$(".tagsBox ul").css({
transform:'translateX('+-1020*$(this).index()+'px)'
})
})
})
//加购
$('.addShopCart').click(function(){
var userTel = $.cookie("userTel");
var goodsId = $(this).parent().parent().parent().prev().prev().prev().html();
var goodsCount = $(this).prev().prev().val();
var goodsSpecs = $(this).prev().val();
let xhr = new XMLHttpRequest();
xhr.open("POST","addShoppingCart.php",true);
xhr.onreadystatechange = function(){
if(xhr.readyState==4 && xhr.status==200){
if(xhr.responseText=="1"){
console.log("添加成功");
}else{
console.log("添加失败");
}
}
}
xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
let sendstr = `userTel=${userTel} & goodsId=${goodsId} & goodsCount=${goodsCount} & goodsSpecs=${goodsSpecs}`;
xhr.send(sendstr);
})
</script>
<!-- 返回顶部 -->
<script>
$(document).ready(function(){
//为当前窗口添加滚动条滚动事件(适用于所有可滚动的元素和 window 对象(浏览器窗口))
$(window).scroll(function(){
//创建一个变量存储当前窗口下移的高度
var scroTop = $(window).scrollTop();
//判断当前窗口滚动高度
//如果大于100,则显示顶部元素,否则隐藏顶部元素
});
//为返回顶部元素添加点击事件
$('.top').click(function(){
//将当前窗口的内容区滚动高度改为0,即顶部
$("html,body").animate({scrollTop:0},"normal");
});
});
</script>
<!-- 引用header -->
<script>
$(function(){
$(".header").load("head.html");
})
</script>