feat:完善首页样式

This commit is contained in:
zjc
2025-01-01 14:14:59 +08:00
parent 0742c6fa93
commit d67ac75031
3 changed files with 57 additions and 54 deletions

View File

@@ -6,14 +6,11 @@
</template>
</Title1>
<div class="flex pt-20">
<div
class="item"
:class="{ core: index == 0, queue: index == 1, congestion: index == 2 }"
v-for="(item, index) in homeData?.scenicSpot"
:key="index"
>
<span class="label">{{ item.name }}</span>
<div class="flex align-end">
<!-- :class="{ core: index == 0, queue: index == 1, congestion: index == 2 }" -->
<div class="item" v-for="(item, index) in homeData?.scenicSpot" :key="index">
<img class="item-icon" src="@/assets/images/core.png" alt="" />
<span class="item-label">{{ item.name }}</span>
<div class="item-value flex align-end rela">
<countup :end-val="item.value" /><span class="unit"></span>
</div>
</div>
@@ -241,24 +238,35 @@
}
.item {
position: relative;
flex: 1;
padding-left: vw(70);
height: vh(52);
margin: 0 vh(10);
flex: 1;
z-index: 1;
display: flex;
align-items: center;
background-size: 100% 100%;
.label {
&-icon {
position: absolute;
width: 100%;
height: auto;
z-index: -1;
}
&-label {
position: absolute;
left: vw(80);
top: vh(-10);
font-weight: 400;
font-size: vw(14);
color: rgba(255, 255, 255, 0.7);
}
.countup-wrap {
color: #02f9fa;
font-size: vw(28);
font-weight: bold;
&-value {
position: absolute;
left: vw(80);
.countup-wrap {
color: #02f9fa;
font-size: vw(28);
font-weight: bold;
}
}
}
.unit {