Repository navigation
Expand file tree
/
Copy pathfetch.html
More file actions
147 lines (133 loc) · 3.07 KB
/
Copy pathfetch.html
File metadata and controls
147 lines (133 loc) · 3.07 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Fetch </title>
</head>
<style type="text/css">
@keyframes rotate-90-cw {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
* {
margin: 0;
padding: 0;
}
html,
body {
width: 100%;
height: 100%;
font-family: "Microsoft Yahei" ,'Avenir', Helvetica, Arial, sans-serif;
}
body {
display: flex;
justify-content: center;
align-items: center;
background-color: #fff;
}
.scoreBoxOut {
position: fixed;
border-radius: 300px;
width: 600px;
height: 600px;
background-image: url('tmbg.png');
background-position: center;
background-size: cover;
animation: rotate-90-cw 10s cubic-bezier(0.49, 0.48, 0.49, 0.47) infinite;
}
.scoreBox {
display: flex;
justify-content: center;
align-items: center;
border-radius: 200px;
width: 350px;
height: 350px;
background-image: linear-gradient(to bottom, #0093ed, #00ace1);
transform: rotate(0);
}
.scoreBoxOne {
display: flex;
justify-content: center;
align-items: center;
border-radius: 150px;
width: 300px;
height: 300px;
background-image: linear-gradient(to bottom, #1d9ded, #0090d2);
}
.scoreBoxTwo {
display: flex;
justify-content: center;
align-items: center;
border-radius: 135px;
width: 270px;
height: 270px;
background-image: linear-gradient(to bottom, #fcffff, #63e0e0);
}
.scoreBoxThree {
display: flex;
justify-content: center;
align-items: center;
position: relative;
border-radius: 120px;
width: 230px;
height: 230px;
background-image: linear-gradient(to bottom, #1c9ceb, #0094d8);
}
.score {
position: absolute;
bottom: 0px;
color: #802d10;
background-image: linear-gradient(to right, #f7dc96, #eec237);
padding: 8px 18px;
border-radius: 25px;
font-weight: 700;
}
.scoreBoxFour {
color: #fff;
font-size: 60px;
}
.scoreBoxFour > p > span {
font-size: 18px;
}
</style>
<body>
<div class="scoreBoxOut"></div>
<div class="scoreBox">
<div class="scoreBoxOne">
<div class="scoreBoxTwo">
<div class="scoreBoxThree">
<div class="scoreBoxFour">
<p> 93 <span> 分 </span> </p>
</div>
<p class="score">本次考试得分</p>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
async function queryNetwork () {
console.time()
fetch('http://test.kitsprite.com:8080/VRClass_Post.ashx?methodName=IsNetWorkConnect&')
.then((response) => {
return response.json()
})
.then((data) => {
console.log('data', data)
})
.catch((err) => {
console.log('This Network Error')
})
.finally(() => { console.log('Finshed') })
console.timeEnd()
}
queryNetwork()
</script>
</html>