5
5
< meta charset ="UTF-8 ">
6
6
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7
7
< meta http-equiv ="X-UA-Compatible " content ="ie=edge ">
8
- < script src ="https://cdn.bootcss.com /jquery/3.3 .1/jquery.min.js "> </ script >
8
+ < script src ="https://cdn.staticfile.org /jquery/3.4 .1/jquery.min.js "> </ script >
9
9
< title > cxmooc-tools</ title >
10
10
</ head >
11
11
< style >
12
- html , body {
12
+ html ,
13
+ body {
13
14
width : 100% ;
14
15
height : 100% ;
15
16
margin : 0 ;
16
-
17
17
}
18
18
/*总盒子*/
19
- .all_box {
20
- background-size : cover;
19
+
20
+ .all_box {
21
+ background-size : cover;
21
22
max-width : 1920px ;
22
23
margin : 0 auto;
23
24
padding : 0 ;
24
25
width : 100% ;
25
26
height : 100% ;
26
- background : url (img/bg.jpg) no-repeat center;
27
- background-size : cover;
27
+ background : url (img/bg.jpg) no-repeat center;
28
+ background-size : cover;
28
29
}
30
+
29
31
.top {
30
32
width : 60% ;
31
33
margin : 0 auto;
32
34
height : 100% ;
33
35
text-align : left;
34
36
}
35
37
/*搜索盒子*/
38
+
36
39
.search {
37
40
text-align : center;
38
41
height : auto;
39
42
padding-top : 200px ;
40
43
background-color : transparent;
41
44
position : relative;
42
45
}
43
- .search input {
46
+
47
+ .search input {
44
48
height : 40px ;
45
49
}
46
50
/*头部文字*/
47
- .search h2 {
51
+
52
+ .search h2 {
48
53
margin-top : 0px ;
49
54
margin-bottom : 0px ;
50
55
font-family : 'Open Sans Condensed' , sans-serif;
51
56
font-weight : 500 ;
52
57
line-height : 1.1 ;
53
58
padding-bottom : 40px ;
54
59
}
55
-
56
- .search h2 span {
60
+
61
+ .search h2 span {
57
62
font-weight : 900 ;
58
63
color : rgba (255 , 87 , 34 , 0.54 );
59
64
}
60
-
65
+
61
66
.topic : hover ,
62
67
.topic : focus {
63
68
box-shadow : 0px 0px 0px 0.5px # 06c4ff ;
64
69
background-color : # ffffff ;
65
70
border : 0px ;
66
71
}
72
+
67
73
.topic {
68
74
transition : all 0.5s ;
69
75
border : 1px solid # 222 ;
81
87
background : none;
82
88
}
83
89
/*包含搜索框和图标盒子*/
84
- .input_box {
90
+
91
+ .input_box {
85
92
width : 100% ;
86
93
height : 100% ;
87
94
margin : 0 ;
88
95
padding : 0 ;
89
96
position : relative;
90
97
}
98
+
91
99
.icon {
92
100
display : inline-block;
93
101
width : 18px ;
97
105
top : 27% ;
98
106
cursor : pointer;
99
107
}
100
-
108
+
101
109
@media (max-width : 600px ) {
102
- /* 下面是分变率改字体*/
103
- .search h2 span {
110
+ /* 下面是分变率改字体*/
111
+ .search h2 span {
104
112
font-size : 15px ;
105
113
font-weight : 900 ;
106
114
color : rgba (255 , 87 , 34 , 0.54 );
107
115
}
108
- .search h2 {
116
+ .search h2 {
109
117
font-size : 15px ;
110
118
}
111
- .all_box a {
119
+ .all_box a {
112
120
font-size : 15px ;
113
121
}
114
- .item p {
122
+ .item p {
115
123
font-size : 15px ;
116
124
}
117
125
/* 下面是分变率改背景图片*/
118
- .all_box {
119
- background : url (img/bg4.jpeg) no-repeat center;
120
- background-size : cover;
126
+ .all_box {
127
+ background : url (img/bg4.jpeg) no-repeat center;
128
+ background-size : cover;
121
129
}
122
130
}
123
-
124
131
/*加入我们文字*/
125
- .join_font {
132
+
133
+ .join_font {
126
134
text-decoration : none;
127
135
color : # 213502 ;
128
136
margin-top : 12px ;
129
- display : inline-block;
130
- vertical-align : middle
137
+ display : inline-block;
138
+ vertical-align : middle
131
139
}
132
- .join_font : hover {
140
+
141
+ .join_font : hover {
133
142
color : rgba (255 , 87 , 34 , 0.54 );
134
143
text-decoration : # a5d7ff ;
135
144
}
136
- .join_font : hover img {
145
+
146
+ .join_font : hover img {
137
147
filter : none;
138
148
opacity : 1 ;
139
149
}
140
-
141
150
/*加入我们图片*/
142
- .join_font img {
151
+
152
+ .join_font img {
143
153
filter : grayscale (100% );
144
154
opacity : 0.66 ;
145
155
padding-left : 10px ;
146
156
margin-top : 1px ;
147
- vertical-align : middle
157
+ vertical-align : middle
148
158
}
149
-
150
-
151
- ::-webkit-scrollbar {
159
+
160
+ ::-webkit-scrollbar {
152
161
width : 6px ;
153
162
height : 6px ;
154
163
}
155
-
156
- ::-webkit-scrollbar-track {
164
+
165
+ ::-webkit-scrollbar-track {
157
166
border-radius : 3px ;
158
167
background : rgba (0 , 0 , 0 , 0.06 );
159
168
-webkit-box-shadow : inset 0 0 5px rgba (0 , 0 , 0 , 0.08 );
160
169
}
161
-
162
- ::-webkit-scrollbar-thumb {
170
+
171
+ ::-webkit-scrollbar-thumb {
163
172
border-radius : 3px ;
164
173
background : rgba (0 , 0 , 0 , 0.12 );
165
174
-webkit-box-shadow : inset 0 0 10px rgba (0 , 0 , 0 , 0.2 );
166
175
}
167
-
176
+
168
177
.answer {
169
178
margin-top : 10px ;
170
179
width : 100% ;
171
180
min-height : 100px ;
172
181
background : # ffffff ;
173
182
border-radius : 6px ;
174
183
}
175
-
184
+
176
185
.success {
177
186
color : # ff0000 ;
178
187
display : inline-block;
179
188
min-width : 33% ;
180
189
}
181
-
190
+
182
191
.topic-content {
183
192
font-size : 18px ;
184
193
}
185
-
194
+
186
195
.answer {
187
196
box-sizing : border-box;
188
197
padding : 6px 4px ;
191
200
overflow-x : hidden;
192
201
display : none;
193
202
}
194
-
203
+
195
204
.answer .item {
196
205
text-align : left;
197
206
}
198
-
207
+
199
208
.answer * {
200
209
margin : 0 ;
201
210
}
202
-
211
+
203
212
.answer .item : not (: first-child ) {
204
213
margin-top : 10px ;
205
214
}
206
215
</ style >
207
216
208
217
< body >
209
218
< div class ="all_box ">
210
- < div class ="top ">
211
- < div class ="search ">
212
- < h2 > Welcome To < span > 超星慕课查找器</ span > </ h2 >
213
- < div class ="input_box ">
214
- < input class ="topic " type ="text " placeholder ="请输入您要搜索的内容 ">
215
- < svg t ="1550848494038 " class ="icon " viewBox ="0 0 1024 1024 " version ="1.1 " xmlns ="http://www.w3.org/2000/svg "
216
- p-id ="1112 " xmlns:xlink ="http://www.w3.org/1999/xlink " width ="200 " height ="200 ">
219
+ < div class ="top ">
220
+ < div class ="search ">
221
+ < h2 > Welcome To < span > 超星慕课查找器</ span > </ h2 >
222
+ < div class ="input_box ">
223
+ < input class ="topic " type ="text " placeholder ="请输入您要搜索的内容 ">
224
+ < svg t ="1550848494038 " class ="icon " viewBox ="0 0 1024 1024 " version ="1.1 " xmlns ="http://www.w3.org/2000/svg " p-id ="1112 " xmlns:xlink ="http://www.w3.org/1999/xlink " width ="200 " height ="200 ">
217
225
< defs >
218
226
< style type ="text/css "> </ style >
219
227
</ defs >
220
228
< path
221
229
d ="M952 896l-204.992-204.992q86.016-106.016 86.016-243.008 0-159.008-112.512-271.488T448.512 64t-272 112.512T64 448.512t112.512 272T448 833.024q136.992 0 242.016-84.992l204.992 204q12 12 28.512 12t28-11.488 11.488-28-11.008-28.512z m-381.984-160Q512 760.992 448 760.992q-63.008 0-120.992-24.992-56-23.008-100-66.016Q184 625.984 160 569.984q-24-58.016-24-122.016 0-63.008 24-120.992 24-56 67.008-99.008 44-44 100-68 58.016-24 120.992-24 64 0 122.016 24 56 24 99.488 67.488T736 326.944q24.992 58.016 24.992 122.016 0 63.008-24.992 120.992-23.008 56-66.016 100-44 43.008-100 66.016z "
222
230
p-id ="1113 "> </ path >
223
231
</ svg >
232
+ </ div >
233
+ </ div >
234
+ < a class ="join_font " target ="_blank " href ="//shang.qq.com/wpa/qunwpa?idkey=ab37aa792572befaacbeb5742ff590337403d2660ca1a0d3e44bd98715d44aab "> 加入我们< img border ="0 " src ="//pub.idqqimg.com/wpa/images/group.png " alt ="超星慕课小工具 " title ="超星慕课小工具 "> </ a >
235
+ < div class ="answer ">
224
236
</ div >
225
237
</ div >
226
- < a class ="join_font " target ="_blank " href ="//shang.qq.com/wpa/qunwpa?idkey=ab37aa792572befaacbeb5742ff590337403d2660ca1a0d3e44bd98715d44aab "> 加入我们< img border ="0 " src ="//pub.idqqimg.com/wpa/images/group.png " alt ="超星刷课不挂感情不翻 " title ="超星刷课不挂感情不翻 "> </ a >
227
- < div class ="answer ">
228
- </ div >
229
- </ div >
230
238
</ div >
231
239
< script >
232
- $ ( '.topic' ) . keydown ( function ( event ) {
240
+ $ ( '.topic' ) . keydown ( function ( event ) {
233
241
if ( event . keyCode == 13 ) {
234
242
queryAnswer ( ) ;
235
243
}
236
244
} ) ;
237
- $ ( '.icon' ) . click ( function ( ) {
245
+ $ ( '.icon' ) . click ( function ( ) {
238
246
queryAnswer ( ) ;
239
247
} ) ;
240
248
241
249
function create ( ) {
242
250
243
251
}
252
+
244
253
function queryAnswer ( ) {
245
254
$ . ajax ( {
246
255
url : 'v2/answer' ,
247
256
method : 'post' ,
248
257
data : 'topic[0]=' + encodeURIComponent ( $ ( '.topic' ) . val ( ) ) ,
249
- success : function ( json ) {
258
+ success : function ( json ) {
250
259
result = json [ 0 ] . result ;
251
260
$ ( '.answer' ) . empty ( ) ;
252
261
for ( item in result ) {
@@ -257,22 +266,25 @@ <h2>Welcome To <span>超星慕课查找器</span></h2>
257
266
html += '<p class="success">' ;
258
267
switch ( result [ item ] . type ) {
259
268
case 1 :
260
- case 2 : {
261
- html += correct [ index ] . option + ': ' + correct [ index ] . content ;
262
- break ;
263
- }
264
- case 3 : {
265
- if ( correct [ index ] . option == true ) {
266
- html += '√ ' ;
267
- } else {
268
- html += '× ' ;
269
+ case 2 :
270
+ {
271
+ html += correct [ index ] . option + ': ' + correct [ index ] . content ;
272
+ break ;
273
+ }
274
+ case 3 :
275
+ {
276
+ if ( correct [ index ] . option == true ) {
277
+ html += '√ ' ;
278
+ } else {
279
+ html += '× ' ;
280
+ }
281
+ break ;
282
+ }
283
+ case 4 :
284
+ {
285
+ html += '第' + correct [ index ] . option + '空: ' + correct [ index ] . content ;
286
+ break ;
269
287
}
270
- break ;
271
- }
272
- case 4 : {
273
- html += '第' + correct [ index ] . option + '空: ' + correct [ index ] . content ;
274
- break ;
275
- }
276
288
}
277
289
html += '</p>' ;
278
290
}
@@ -289,4 +301,4 @@ <h2>Welcome To <span>超星慕课查找器</span></h2>
289
301
290
302
</ body >
291
303
292
- </ html >
304
+ </ html >
0 commit comments