11
huanghongfeng
5 天以前 f4c3f82a3bd142bc555ec7f632dabc66ef86f5af
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<template>
  <ul class="user_Overview flex">
    <li class="user_Overview-item">
      <div class="user_Overview_nums" :class="kst ? 'allnum' : 'online'">
        <dv-digital-flop style="width:100%;height:100%;" />
      </div>
      <p>正常</p>
    </li>
  </ul>
</template>
 
<script>
export default {
  data() {
    return {
      kst: true, 
    };
  },
};
</script>
 
<style lang='scss' scoped>
.user_Overview {
  li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
 
    p {
      text-align: center;
      font-size: 16px;
      margin-top: 10px;
    }
 
    .user_Overview_nums {
      
      width: 200px;  /* 放大容器 */
      height: 200px;
      text-align: center;
      line-height: 250px;
      font-size: 52px;
      margin: 50px auto;
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
 
      &::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;  /* 关键修改:等比例缩放 */
        z-index: 1;
      }
 
      /* 数字内容层级提高 */
      > * {
        position: relative;
        z-index: 2;
      }
 
      &.bgdonghua::before {
        animation: rotating 14s linear infinite;
      }
    }
 
    /* 不同类名对应不同背景图 */
    .allnum::before {
      background-image: url("../../assets/img/left_top_lan.png");
    }
 
    .online::before {
      background-image: url("../../assets/img/left_top_lv.png");
    }
 
    .offline::before {
      background-image: url("../../assets/img/left_top_huang.png");
    }
 
    .laramnum::before {
      background-image: url("../../assets/img/left_top_hong.png");
    }
  }
}
</style>