JSDM

HTML

 
1
<svg class="spinner" width="65px" height="65px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
2
   <circle class="path" fill="none" stroke-width="6" stroke-linecap="round" cx="33" cy="33" r="30"></circle>
3
</svg>
!

CSS

x
 
1
// This is just to center the spinner
2
3
html, body { height: 100%; }
4
5
body {
6
   display: flex;
7
   align-items: center;
8
   justify-content: center;
9
}
10
11
// Here is where the magic happens
12
13
$offset: 187;
14
$duration: 1.4s;
15
16
.spinner {
17
  animation: rotator $duration linear infinite;
18
}
19
20
@keyframes rotator {
21
  0% { transform: rotate(0deg); }
22
  100% { transform: rotate(270deg); }
23
}
24
25
.path {
26
  stroke-dasharray: $offset;
27
  stroke-dashoffset: 0;
28
  transform-origin: center;
29
  animation:
30
    dash $duration ease-in-out infinite, 
31
    colors ($duration*4) ease-in-out infinite;
32
}
33
34
@keyframes colors {
35
  0% { stroke: #4285F4; }
36
  25% { stroke: #DE3E35; }
37
  50% { stroke: #F7C223; }
38
  75% { stroke: #1B9A59; }
39
  100% { stroke: #4285F4; }
40
}
41
42
@keyframes dash {
43
 0% { stroke-dashoffset: $offset; }
44
 50% {
45
   stroke-dashoffset: $offset/4;
46
   transform:rotate(135deg);
47
 }
48
 100% {
49
   stroke-dashoffset: $offset;
50
   transform:rotate(450deg);
51
 }
52
}
!
? ?
? ?
必须是有效的URL
+ 添加另一个资源

JS

xxxxxxxxxx
1
 
1
!
必须是有效的URL
+ 添加另一个资源
Close

文件管理 点击文件查看URL

图片

  1. 暂无文件

CSS

  1. 暂无文件

JavaScript

  1. 暂无文件

其他

  1. 暂无文件
拖动文件到上面的区域或者:
加载中 ..................