You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
141 lines
3.0 KiB
141 lines
3.0 KiB
2 months ago
|
<template>
|
||
1 month ago
|
<!-- 背景 -->
|
||
|
<view class="background">
|
||
2 months ago
|
|
||
1 month ago
|
<!-- 人物 -->
|
||
|
<image class="human" src="/static/information/boy_height/pictures/human.png"></image>
|
||
|
<!-- 滚动条 -->
|
||
1 month ago
|
<image class="roll" @click="go_to_roll" src="/static/information/boy_height/pictures/roll.png"></image>
|
||
1 month ago
|
<!-- 按钮 -->
|
||
1 month ago
|
<image class="button" @click="go_to_purpose" src="/static/information/boy_height/pictures/button.png"></image>
|
||
1 month ago
|
<!-- 进度条 -->
|
||
|
<image class="progress" src="/static/information/boy_height/pictures/progress.png"></image>
|
||
|
<!-- 文本-->
|
||
1 month ago
|
<text class="text" @click="go_to_roll()">175 cm</text>
|
||
2 months ago
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
1 month ago
|
methods: {
|
||
|
navigateTo(page) {
|
||
|
uni.navigateTo({
|
||
|
url: page
|
||
|
});
|
||
|
},
|
||
|
|
||
1 month ago
|
go_to_purpose() {
|
||
|
this.navigateTo('/pages/information/purpose/purpose');
|
||
1 month ago
|
},
|
||
|
|
||
1 month ago
|
go_to_roll() {
|
||
|
this.navigateTo('/pages/information/boy_height_roll/boy_height_roll');
|
||
1 month ago
|
height:''
|
||
|
},
|
||
|
}
|
||
2 months ago
|
}
|
||
1 month ago
|
|
||
2 months ago
|
</script>
|
||
|
|
||
|
<style lang="scss">
|
||
1 month ago
|
.background {
|
||
|
background-image: url("/static/information/boy_height/pictures/img.png");
|
||
|
background-size: cover;
|
||
|
background-position: center;
|
||
|
height: 100vh;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: center;
|
||
|
overflow: hidden;
|
||
|
position: relative;
|
||
|
}
|
||
|
|
||
|
/* Human 动画,从页面中部向上移动 */
|
||
|
.human {
|
||
|
position: absolute;
|
||
|
width: 100%;
|
||
|
height: 90%;
|
||
|
top:10%;
|
||
|
object-fit: contain; /* 保持图片比例 */
|
||
|
animation: moveUp 2s ease forwards;
|
||
|
top: 30%; /* 起始位置 */
|
||
|
transform: translateY(-50%); /* 垂直居中 */
|
||
|
}
|
||
|
|
||
|
.progress{
|
||
|
position: absolute;
|
||
|
width: 77%;
|
||
|
height: 7%;
|
||
|
object-fit: contain; /* 保持图片比例 */
|
||
|
animation: fadeIn 1s ease 2s forwards; /* 2秒后显示 */
|
||
|
opacity: 0;
|
||
|
top: 2%; /* 根据需要调整位置 */
|
||
|
}
|
||
|
|
||
|
/* Text 延迟显示 */
|
||
|
.roll {
|
||
|
position: absolute;
|
||
|
width: 77%;
|
||
|
height: 20%;
|
||
|
object-fit: contain; /* 保持图片比例 */
|
||
|
animation: fadeIn 1s ease 2s forwards; /* 2秒后显示 */
|
||
|
opacity: 0;
|
||
|
top: 55%; /* 根据需要调整位置 */
|
||
|
}
|
||
|
|
||
|
/* Button 延迟显示并加缩放特效,放在下方 */
|
||
|
.button {
|
||
|
position: absolute;
|
||
1 month ago
|
height: 13%;
|
||
|
width: 80%;
|
||
1 month ago
|
animation: fadeInScale 1s ease 2.5s forwards; /* 2.5秒后显示并缩放 */
|
||
|
opacity: 0;
|
||
|
right: 10%; /* 距右边 10% */
|
||
|
bottom: 2%; /* 距底部 3.5% */
|
||
|
}
|
||
2 months ago
|
|
||
1 month ago
|
.text{
|
||
|
position: absolute;
|
||
|
font-size: 1.5em;
|
||
|
text-align: center;
|
||
|
width: 100%;
|
||
|
height: 20%;
|
||
1 month ago
|
top: 69%;
|
||
1 month ago
|
animation: fadeIn 1s ease 2s forwards; /* 2秒后显示 */
|
||
|
opacity: 0;
|
||
|
color:#ffffff;
|
||
|
}
|
||
|
|
||
|
/* 定义 human 上移动画 */
|
||
|
@keyframes moveUp {
|
||
|
from {
|
||
|
top: 70%;
|
||
|
}
|
||
|
to {
|
||
|
top: 35%; /* 移动到页面顶部 10% */
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* Text 和 Button 的渐入动画 */
|
||
|
@keyframes fadeIn {
|
||
|
from {
|
||
|
opacity: 0;
|
||
|
}
|
||
|
to {
|
||
|
opacity: 1;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* Button 的缩放渐入动画 */
|
||
|
@keyframes fadeInScale {
|
||
|
from {
|
||
|
opacity: 0;
|
||
|
transform: scale(0.8);
|
||
|
}
|
||
|
to {
|
||
|
opacity: 1;
|
||
|
transform: scale(1);
|
||
|
}
|
||
|
}
|
||
2 months ago
|
</style>
|