红蓝两色底座,底部描述,中间数字效果。
组件代码
<template>
<div class="numList">
<div class="numItem1">
<div class="num1">
<numcard :number="6"></numcard>
</div>
<p>产废企业数量</p>
</div>
<div class="numItem1 numItem2">
<div class="num1">
<numcard :number="8"></numcard>
</div>
<p>产废企业数量</p>
</div>
</div>
</template>
<script>
import numcard from "@/components/numcard/numcard.vue";
export default {
name: "title",
data() {
return {}
},
components: {numcard},
mounted() {},
}
</script>
<style lang="scss" scoped>
.numList {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: nowrap;
flex-direction: row;
align-content: flex-start;
padding-top: 5px;
padding-bottom: 10px;
.numItem1 {
background: url("./assets/numbg1.png") center top no-repeat;
background-size: 159px 114px;
width: 159px;
height: 130px;
display: flex;
justify-content: flex-start;
align-items: flex-start;
flex-wrap: nowrap;
flex-direction: column;
align-content: flex-start;
.num1 {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: nowrap;
flex-direction: row;
align-content: flex-start;
font-size: 30px;
font-family: DIN;
font-weight: bold;
color: #FFFFFF;
height: 80px;
.numCard {
padding-top: 20px;
}
}
p {
font-size: 16px;
font-family: PingFang;
font-weight: 500;
color: #E8EDFF;
text-align: center;
width: 100%;
margin-top: 20px;
}
}
.numItem2 {
background: url("./assets/numbg2.png") center top no-repeat;
background-size: 159px 114px;
}
}
</style>
更多底座效果
实例代码
代码基于vue3 vite js node.js 开发 请确保有相关的开发经验