|
@@ -0,0 +1,158 @@
|
|
1
|
+<!DOCTYPE html>
|
|
2
|
+<html lang="zh-cn">
|
|
3
|
+ <head>
|
|
4
|
+ <meta charset="UTF-8" />
|
|
5
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+ <title>Document</title>
|
|
8
|
+ <style>
|
|
9
|
+ .header_box {
|
|
10
|
+ position: relative;
|
|
11
|
+ margin: 0 auto;
|
|
12
|
+ width: 13rem;
|
|
13
|
+ height: 0.8rem;
|
|
14
|
+ font-size: 0.14rem;
|
|
15
|
+ }
|
|
16
|
+ .header_box .header_right {
|
|
17
|
+ float: right;
|
|
18
|
+ }
|
|
19
|
+ .header_box .header_right > .header_nav_item {
|
|
20
|
+ position: relative;
|
|
21
|
+ float: left;
|
|
22
|
+ margin-left: 0.55rem;
|
|
23
|
+ height: 0.8rem;
|
|
24
|
+ line-height: 0.8rem;
|
|
25
|
+ cursor: pointer;
|
|
26
|
+ }
|
|
27
|
+ .header_box .header_right > .header_nav_lang {
|
|
28
|
+ position: relative;
|
|
29
|
+ float: left;
|
|
30
|
+ margin-left: 0.55rem;
|
|
31
|
+ height: 0.8rem;
|
|
32
|
+ line-height: 0.8rem;
|
|
33
|
+ cursor: pointer;
|
|
34
|
+ }
|
|
35
|
+ .header_box .header_right > .header_nav_item > div::after {
|
|
36
|
+ content: "";
|
|
37
|
+ width: 0;
|
|
38
|
+ position: absolute;
|
|
39
|
+ background: #2d8cf0;
|
|
40
|
+ height: 0.04rem;
|
|
41
|
+ bottom: 0;
|
|
42
|
+ left: 50%;
|
|
43
|
+ transform: translateX(-50%);
|
|
44
|
+ -webkit-transform: translateX(-50%);
|
|
45
|
+ transition: all 0.3s ease-out;
|
|
46
|
+ -webkit-transition: all 0.3s ease-out;
|
|
47
|
+ }
|
|
48
|
+ .header_box .header_right > .header_nav_item:hover > div::after,
|
|
49
|
+ .header_box .header_right > .header_nav_item.selected > div::after {
|
|
50
|
+ width: 100%;
|
|
51
|
+ }
|
|
52
|
+ .header_box .header_right > .header_nav_lang .nav_language_en {
|
|
53
|
+ background-color: #2d8cf0;
|
|
54
|
+ position: absolute;
|
|
55
|
+ top: 0.6rem;
|
|
56
|
+ left: 50%;
|
|
57
|
+ transform: translateX(-50%) translateY(50%);
|
|
58
|
+ -webkit-transform: translateX(-50%) translateY(50%);
|
|
59
|
+ padding: 0.06rem 0;
|
|
60
|
+ -webkit-transition: all 0.2s ease-in-out;
|
|
61
|
+ transition: all 0.2s ease-in-out;
|
|
62
|
+ visibility: hidden;
|
|
63
|
+ opacity: 0;
|
|
64
|
+ z-index: 100;
|
|
65
|
+ text-align: center;
|
|
66
|
+ font-size: 0.14rem;
|
|
67
|
+ line-height: 0.4rem;
|
|
68
|
+ color: #fff;
|
|
69
|
+ border-radius: 0.08rem;
|
|
70
|
+ }
|
|
71
|
+ .header_box .header_right > .header_nav_lang:hover .nav_language_en {
|
|
72
|
+ display: block;
|
|
73
|
+ visibility: visible;
|
|
74
|
+ transform: translateX(-50%) translateY(0%);
|
|
75
|
+ -webkit-transform: translateX(-50%) translateY(0%);
|
|
76
|
+ opacity: 1;
|
|
77
|
+ }
|
|
78
|
+ .header_box
|
|
79
|
+ .header_right
|
|
80
|
+ > .header_nav_lang:hover
|
|
81
|
+ .nav_language_en::after {
|
|
82
|
+ border-left: 0.07rem solid transparent;
|
|
83
|
+ border-right: 0.07rem solid transparent;
|
|
84
|
+ border-top: 0.09660254rem solid #2d8cf0;
|
|
85
|
+ width: 0;
|
|
86
|
+ height: 0;
|
|
87
|
+ content: "";
|
|
88
|
+ position: absolute;
|
|
89
|
+ top: -0.08rem;
|
|
90
|
+ left: 50%;
|
|
91
|
+ transform: translateX(-50%) rotate(180deg);
|
|
92
|
+ -webkit-transform: translateX(-50%) rotate(180deg);
|
|
93
|
+ }
|
|
94
|
+ .header_box .header_right > .header_nav_lang:hover .nav_language_en a {
|
|
95
|
+ color: #fff;
|
|
96
|
+ display: block;
|
|
97
|
+ padding: 0;
|
|
98
|
+ margin: 0 0.12rem;
|
|
99
|
+ transition: all 0.3s ease-out;
|
|
100
|
+ -webkit-transition: all 0.3s ease-out;
|
|
101
|
+ text-decoration: none;
|
|
102
|
+ }
|
|
103
|
+ </style>
|
|
104
|
+ </head>
|
|
105
|
+ <body>
|
|
106
|
+ <div class="header_box">
|
|
107
|
+ <div></div>
|
|
108
|
+ <div class="header_right">
|
|
109
|
+ <div data-nav="1" class="header_nav_item nav_1">
|
|
110
|
+ <div>产品中心</div>
|
|
111
|
+ </div>
|
|
112
|
+ <div data-nav="2" class="header_nav_item nav_2">
|
|
113
|
+ <div>服务案例</div>
|
|
114
|
+ </div>
|
|
115
|
+ <div data-nav="3" class="header_nav_item nav_3">
|
|
116
|
+ <div>关于我们</div>
|
|
117
|
+ </div>
|
|
118
|
+ <div data-nav="4" class="header_nav_item nav_4">
|
|
119
|
+ <div>申请试用</div>
|
|
120
|
+ </div>
|
|
121
|
+ <div data-nav="5" class="header_nav_item nav_5">
|
|
122
|
+ <div>新闻资讯</div>
|
|
123
|
+ </div>
|
|
124
|
+ <div class="header_nav_lang">
|
|
125
|
+ 中文
|
|
126
|
+ <div class="nav_language_en">
|
|
127
|
+ <a href="#" target="_blank">English</a>
|
|
128
|
+ </div>
|
|
129
|
+ </div>
|
|
130
|
+ </div>
|
|
131
|
+ </div>
|
|
132
|
+ <script>
|
|
133
|
+ $(function() {
|
|
134
|
+ let nav_info = $(".header_root").data("nav_info");
|
|
135
|
+ $(".header_box > .header_right > .header_nav_item").removeClass("selected");
|
|
136
|
+ if (nav_info) {
|
|
137
|
+ $(".header_box > .header_right > .header_nav_item.nav_" + nav_info).addClass("selected");
|
|
138
|
+ }
|
|
139
|
+ $(".header_box > .header_right").on("click", ".header_nav_item", function (ev) {
|
|
140
|
+ $(".header_box > .header_right > .header_nav_item").removeClass("selected");
|
|
141
|
+ let nav_num = $(this).data("nav");
|
|
142
|
+ $(".header_box > .header_right > .header_nav_item.nav_" + nav_num).addClass("selected");
|
|
143
|
+ if (nav_num === 1) {
|
|
144
|
+ console.log("产品中心");
|
|
145
|
+ } else if (nav_num === 2) {
|
|
146
|
+ console.log("服务案例");
|
|
147
|
+ } else if (nav_num === 3) {
|
|
148
|
+ console.log("关于我们");
|
|
149
|
+ } else if (nav_num === 4) {
|
|
150
|
+ console.log("申请试用");
|
|
151
|
+ } else if (nav_num === 5) {
|
|
152
|
+ console.log("新闻资讯");
|
|
153
|
+ }
|
|
154
|
+ });
|
|
155
|
+ });
|
|
156
|
+ </script>
|
|
157
|
+ </body>
|
|
158
|
+</html>
|