<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>
|