-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ cell | 移动端cell布局 | |
fill-block | 填充空余部分 | ||
UI | UI组件 | ||
ul | 列表样式 | ||
spinner | loading加载中样式 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!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>spinner</title> | ||
<style> | ||
body { | ||
padding: 50px; | ||
} | ||
.spinner { | ||
width: 100px; | ||
height: 100px; | ||
border-radius: 50%; | ||
border: 5px solid transparent; | ||
border-top-color: #FF6666; | ||
animation: loading .8s linear infinite; | ||
} | ||
@keyframes loading { | ||
from { | ||
transform: rotate(0); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="spinner"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!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>spinner</title> | ||
<style> | ||
.spinner { | ||
fill: none; | ||
stroke: #FF6666; | ||
stroke-width: 5px; | ||
stroke-dasharray: 100 214; | ||
stroke-dashoffset: 130; | ||
transform-origin: 50% 50%; | ||
animation: loading .8s linear infinite; | ||
} | ||
@keyframes loading { | ||
from { | ||
transform: rotate(0); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<svg width="200" height="200"> | ||
<circle id="svg-circle" class="spinner" cx="100" cy="100" r="50"></circle> | ||
</svg> | ||
</body> | ||
<script> | ||
const circle = document.getElementById('svg-circle'); | ||
const radius = circle.r.baseVal.value; | ||
const C = radius * 2 * Math.PI; | ||
console.log(`周长是:${C}`); | ||
</script> | ||
</html> |