wxml
<view class="arrow-up"></view>
<view class="arrow-down"></view>
wxss
.arrow-up {
width: 25rpx;
height: 25rpx;
border-top: 6rpx solid white;
border-right: 6rpx solid white;
margin-left: 50%;
transform: translateX(-50%) rotate(-45deg);
animation: arrow-up-animation 3s infinite;
position: absolute;
}
@keyframes arrow-up-animation {
0% {
top: 11vh;
}
50% {
top: 8vh;
}
100% {
top: 11vh;
}
}
.arrow-down {
width: 25rpx;
height: 25rpx;
border-top: 6rpx solid white;
border-right: 6rpx solid white;
margin-left: 50%;
transform: translateX(-50%) rotate(135deg);
animation: arrow-down-animation 3s infinite;
position: absolute;
}
@keyframes arrow-down-animation {
0% {
bottom: 8vh;
}
50% {
bottom: 11vh;
}
100% {
bottom: 8vh;
}
}