JSDM

HTML

9
1
#container
2
  .circle
3
  .circle
4
  .circle
5
  .circle
6
  .circle
7
  
8
9
!

CSS

xxxxxxxxxx
58
 
1
$circleBaseSize: 20px; // Prefer an odd number to avoid pixel gaps
2
$circleNumber: 5; // Have to match the number of div.color in your html
3
$circleColor: #5ad; // Color of the circles
4
$circleBorderWidth: 2px;
5
6
* {
7
  margin: 0;
8
  padding: 0;
9
  box-sizing: border-box;
10
}
11
12
body {
13
  line-height: 100vh;
14
  text-align: center;
15
}
16
17
#container {
18
  display: inline-block;
19
  width: $circleNumber*$circleBaseSize;
20
  height: $circleNumber*$circleBaseSize;
21
  position: relative;
22
}
23
24
@for $i from 1 through $circleNumber {
25
  
26
  .circle:nth-child(#{$i}) {
27
    width: $i*$circleBaseSize;
28
    height: $i*$circleBaseSize;
29
    border-radius: 50%;
30
    border-width: $circleBorderWidth;
31
    border-style: solid;
32
    border-color: transparent;
33
    -webkit-transform-origin: center center;
34
    -webkit-animation: wave#{$i} 1.8s ease-in infinite;
35
    -webkit-animation-delay: $i*0.1s;
36
    
37
    position: absolute;
38
    top: ($circleNumber*$circleBaseSize/2)-($i*$circleBaseSize/2);
39
    left: ($circleNumber*$circleBaseSize/2)-($i*$circleBaseSize/2);
40
  }
41
42
  @-webkit-keyframes wave#{$i}{
43
    0% { 
44
      -webkit-transform: scale(1);
45
    }
46
    10% { 
47
      -webkit-transform: scale(1+0.3/$i);
48
      border-color: $circleColor;
49
    }
50
    20% { 
51
      -webkit-transform: scale(1);
52
    }
53
    100% { 
54
      -webkit-transform: scale(1);
55
      border-color: transparent;
56
    }
57
  }
58
}
!
? ?
? ?
必须是有效的URL
+ 添加另一个资源

JS

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

文件管理 点击文件查看URL

图片

  1. 暂无文件

CSS

  1. 暂无文件

JavaScript

  1. 暂无文件

其他

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