0%

首屏箭头示意向下滚动动画(有弹跳效果)

效果借鉴自:https://www.intercom.com/

见代码👇

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<style type="text/css">

@keyframes go_down_animation {
0% {
transform: scale(1, 1) translateY(0px);
}
10% {
transform: scale(1.1, 0.9) translateY(0px);
}
30% {
transform: scale(0.9, 1.1) translateY(-30px);
}
50% {
transform: scale(1.05, 0.95) translateY(0px);
}
57% {
transform: scale(1, 1) translateY(-7px);
}
64% {
transform: scale(1, 1) translateY(0px);
}
100% {
transform: scale(1, 1) translateY(0px);
}
}

.home_arrow {
opacity: 1;
}
.home_arrow_div > .home_arrow{
z-index: 3;
position: absolute;
bottom: 20px;
left: 50%;
width: 40px;
height: 40px;
transform: translateX(-50%);
transition-delay: 5s;
}

.bou {
position: absolute;
bottom: 0px;
left: 10px;
animation-duration: 4s;
animation-iteration-count: infinite;
transform-origin: center bottom;

animation-name: go_down_animation;
animation-timing-function: cubic-bezier(0.28, 0.84, 0.42, 1);
}

</style>


<body>

<div class="home_arrow home_arrow_div">
<img class="home_arrow bou" src="arrow.svg">
</div>

svg:

1
2
3
<svg width="39" height="16" viewBox="0 0 39 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2 2L19.5 14L37 2" stroke="#A0A0A0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

欢迎关注我的其它发布渠道