修改页面4代码

master
Gary 1 month ago
parent 0732be076c
commit 4c91d6a468

@ -24,12 +24,12 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/transition/page5/page5", "path": "pages/transition/page5/page5",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
} }
], ],
"uniIdRouter": {}, "uniIdRouter": {},
"tabBar": null "tabBar": null

@ -1,7 +1,6 @@
<template> <template>
<view class="page1"> <!-- 页面1 图片 -->
<!-- 设置图片渐变的效果显示 --> <view class="page1"></view>
</view>
</template> </template>
<script> <script>

@ -2,7 +2,7 @@
<view class="background"> <view class="background">
<!--按钮--> <!--按钮-->
<image class="button" @click="click" src="@/static/transition/page2/pictures/button.png"></image> <image class="button" @click="click" src="@/static/transition/page2/pictures/button.png"></image>
<!--按钮-->
</view> </view>
</template> </template>

@ -1,5 +1,8 @@
<template> <template>
<!-- 背景 -->
<view class="background"> <view class="background">
<image class="blue_background" src="/static/transition/page3/pictures/blue_background.png"></image>
<!-- 人物 --> <!-- 人物 -->
<image class="human" src="/static/transition/page3/pictures/human.png"></image> <image class="human" src="/static/transition/page3/pictures/human.png"></image>
<!-- 文字 --> <!-- 文字 -->
@ -33,16 +36,25 @@ export default {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
} }
.blue_background{
position: absolute;
top: 0%;
width: 100%;
height: 50%;
object-fit: cover; /* 保持图片比例 */
animation: fadeIn 1s ease forwards; /* 1秒后显示 */
opacity: 0;
}
/* Human 动画,从页面中部向上移动 */ /* Human 动画,从页面中部向上移动 */
.human { .human {
position: absolute; position: absolute;
width: 100%; width: 75%;
height: 48%; height: 48%;
object-fit: contain; /* 保持图片比例 */ object-fit: contain; /* 保持图片比例 */
animation: moveUp 2s ease forwards; animation: moveUp 2s ease forwards;
top: 50%; /* 起始位置 */ top: 30%; /* 起始位置 */
transform: translateY(-50%); /* 垂直居中 */ transform: translateY(-50%); /* 垂直居中 */
} }
@ -72,10 +84,10 @@ export default {
/* 定义 human 上移动画 */ /* 定义 human 上移动画 */
@keyframes moveUp { @keyframes moveUp {
from { from {
top: 50%; top: 70%;
} }
to { to {
top: 20%; /* 移动到页面顶部 10% */ top: 25.8%; /* 移动到页面顶部 10% */
} }
} }

@ -1,18 +1,21 @@
<template> <template>
<!-- 背景 -->
<view class="background"> <view class="background">
<image class="blue_background" src="/static/transition/page4/pictures/blue_background.png"></image>
<!-- 人物 --> <!-- 人物 -->
<image class="human" src="/static/transition/page4/pictures/human.png"></image> <image class="human" src="/static/transition/page4/pictures/human.png"></image>
<!-- 文字 --> <!-- 文字 -->
<image class="text" src="/static/transition/page4/pictures/text.png"></image> <image class="text" src="/static/transition/page4/pictures/text.png"></image>
<!-- 按钮 --> <!-- 按钮 -->
<image class="button" @click="goToPage4" src="/static/transition/page4/pictures/button.png"></image> <image class="button" @click="goToPage3" src="/static/transition/page4/pictures/button.png"></image>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
methods: { methods: {
goToPage4() { goToPage3() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/transition/page5/page5' // page5 url: '/pages/transition/page5/page5' // page5
}); });
@ -34,28 +37,39 @@ export default {
position: relative; position: relative;
} }
.blue_background {
position: absolute;
top: 0%;
width: 100%;
height: 50%;
object-fit: cover; /* 保持图片比例 */
animation: fadeIn 1s ease forwards; /* 1秒后显示 */
opacity: 0;
}
/* Human 动画,从页面中部向上移动 */ /* Human 动画,从页面中部向上移动 */
.human { .human {
position: absolute; position: absolute;
width: 100%; width: 75%;
height: 48%; height: 48%;
object-fit: contain; /* 保持图片比例 */ object-fit: contain; /* 保持图片比例 */
animation: moveUp 2s ease forwards; animation: moveUp 2s ease forwards;
top: 50%; /* 起始位置 */ top: 30%; /* 起始位置 */
transform: translateY(-50%); /* 垂直居中 */ transform: translateY(-50%); /* 垂直居中 */
} }
/* Text 延迟显示 */ /* Text 延迟显示 */
.text { .text {
position: absolute; position: absolute;
width: 90%; width: 85%;
height: 17%; height: 12%;
object-fit: contain; /* 保持图片比例 */ object-fit: contain; /* 保持图片比例 */
animation: fadeIn 1s ease 2s forwards; /* 2秒后显示 */ animation: fadeIn 1s ease 2s forwards; /* 2秒后显示 */
opacity: 0; opacity: 0;
top: 50%; /* 根据需要调整位置 */ top: 55%; /* 根据需要调整位置 */
} }
/* Button 延迟显示并加缩放特效,放在右下角 */ /* Button 延迟显示并加缩放特效,放在右下角 */
@ -72,10 +86,10 @@ export default {
/* 定义 human 上移动画 */ /* 定义 human 上移动画 */
@keyframes moveUp { @keyframes moveUp {
from { from {
top: 50%; top: 70%;
} }
to { to {
top: 20%; /* 移动到页面顶部 10% */ top: 28%; /* 移动到页面顶部 10% */
} }
} }
@ -100,4 +114,4 @@ export default {
transform: scale(1); transform: scale(1);
} }
} }
</style> </style>

@ -1,8 +1,17 @@
<template> <template>
<view >
</view>
</template> </template>
<script> <script>
export default {
data() {
return {};
}
}
</script> </script>
<style> <style lang="scss">
</style>
</style>

@ -0,0 +1,17 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {};
}
}
</script>
<style lang="scss">
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 KiB

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 71 KiB

@ -1,8 +1,8 @@
{ {
"hash": "48f6c93b", "hash": "3dcffc29",
"configHash": "badd50c8", "configHash": "cc60d382",
"lockfileHash": "e3b0c442", "lockfileHash": "e3b0c442",
"browserHash": "debd2ea0", "browserHash": "e601f541",
"optimized": {}, "optimized": {},
"chunks": {} "chunks": {}
} }
Loading…
Cancel
Save