JSDM

HTML

 
1
<div class="cylinder">
2
  <span></span>
3
  <i id="num" style="height:10%"></i>
4
</div>

CSS

x
 
1
      * {
2
        margin: 0;
3
        padding: 0;
4
        box-sizing: border-box;
5
      }
6
7
      body {
8
        background-color: #0a1339;
9
      }
10
11
      .cylinder {
12
        width: 100px;
13
        height: 300px;
14
        margin: 100px;
15
        position: relative;
16
      }
17
18
      .cylinder span {
19
        position: absolute;
20
        top: 0;
21
        left: 0;
22
        width: 100%;
23
        height: 100%;
24
        z-index: 0;
25
        background-image: linear-gradient(to right, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
26
      }
27
28
      .cylinder span::after {
29
        content: '';
30
        position: absolute;
31
        width: 100%;
32
        height: 30px;
33
        background-image: linear-gradient(to right, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
34
        bottom: -30px;
35
        border-radius: 0 0 50% 50%;
36
      }
37
38
      .cylinder span::before {
39
        content: '';
40
        position: absolute;
41
        width: 100%;
42
        height: 30px;
43
        background-color: #1d2b54;
44
        top: -15px;
45
        border-radius: 50%;
46
      }
47
48
      .cylinder i {
49
        position: absolute;
50
        width: 80%;
51
        background-color: #1865d4;
52
        bottom: -12px;
53
        left: 10%;
54
        z-index: 1;
55
        transition: 0.3s;
56
        background-image: linear-gradient(to right, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
57
      }
58
59
      .cylinder i::after {
60
        content: '';
61
        position: absolute;
62
        width: 100%;
63
        height: 18px;
64
        background-color: #1865d4;
65
        bottom: -18px;
66
        border-radius: 0 0 50% 50%;
67
        background-image: linear-gradient(to right, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
68
      }
69
70
      .cylinder i::before {
71
        content: '';
72
        position: absolute;
73
        width: 100%;
74
        z-index: 2;
75
        height: 24px;
76
        background-color: #5697e8;
77
        top: -12px;
78
        border-radius: 50%;
79
      }
? ?
? ?
必须是有效的URL
+ 添加另一个资源

JS

xxxxxxxxxx
11
 
1
    const el = document.getElementById('num')
2
    const time = (num, t) => {
3
      setTimeout(() => {
4
        el.style.height = num
5
      }, t)
6
    }
7
    setInterval(() => {
8
      time('80%', 0)
9
      time('50%', 1000)
10
      time('20%', 2000)
11
    }, 3000)
必须是有效的URL
+ 添加另一个资源
Close

文件管理 点击文件查看URL

图片

  1. 暂无文件

CSS

  1. 暂无文件

JavaScript

  1. 暂无文件

其他

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