<template>
<view class="box">
<view class="gradient-wrapper">
<image src="../../static/logo.png" mode=""></image>
</view>
</view>
</template>
<script>
</script>
<style>
.@keyframes wrapper-gradient {
0% {
transform: translateY(100%);
}
100% {
transform: translateY(0);
}
}
@keyframes img-gradient {
0% {
transform: translateY(-100%);
}
100% {
transform: translateY(0);
}
}
.gradient-wrapper {
display: inline-block;
overflow: hidden;
animation: wrapper-gradient 2s linear;
}
.gradient-wrapper>image {
animation: img-gradient 2s linear;
}
</style>
css实现图片从上往下显示效果
最新推荐文章于 2024-07-11 17:14:12 发布