-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
59 lines (59 loc) · 1.48 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="manifest" href="manifest.json">
<title>品词轩</title>
<!-- <link rel="icon" href="favicon.ico" type="image/x-icon" /> -->
<script>
window.v = window.version = '4.0.2'
// 检测浏览器是否支持SW
if(navigator.serviceWorker != null){
navigator.serviceWorker.register('sw.js',{scope: '/'})
.then(function(registartion){
//注册成功
console.log('支持sw:',registartion.scope)
}).catch(function (err){
console.log('fail')
});
}
</script>
</head>
<body>
<div id="app">
<style>
html,
body {
padding: 0;
margin: 0;
background-color: #eee;
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.circle {
width: 30px;
height: 30px;
border-radius: 50%;
border: 4px solid purple;
border-left-color: transparent;
animation: rotate 1s linear infinite;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
</style>
<div class="circle"></div>
</div>
<!-- built files will be auto injected -->
</body>
</html>