Skip to content

Commit 350cc91

Browse files
committed
adding arrow
1 parent aaba947 commit 350cc91

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed

my-app/src/pages/Home.css

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,65 @@
5555
border-radius: 12px;
5656
border: none;
5757
}
58+
59+
.arrows {
60+
width: 60px;
61+
height: 72px;
62+
position: absolute;
63+
left: 50%;
64+
margin-left: -30px;
65+
bottom: 20px;
66+
}
67+
68+
.arrows path {
69+
stroke: rgb(31, 79, 182);
70+
fill: transparent;
71+
stroke-width: 1px;
72+
animation: arrow 2s infinite;
73+
-webkit-animation: arrow 2s infinite;
74+
}
75+
76+
@keyframes arrow {
77+
0% {
78+
opacity: 0;
79+
}
80+
40% {
81+
opacity: 1;
82+
}
83+
80% {
84+
opacity: 0;
85+
}
86+
100% {
87+
opacity: 0;
88+
}
89+
}
90+
91+
@-webkit-keyframes arrow /*Safari and Chrome*/ {
92+
0% {
93+
opacity: 0;
94+
}
95+
40% {
96+
opacity: 1;
97+
}
98+
80% {
99+
opacity: 0;
100+
}
101+
100% {
102+
opacity: 0;
103+
}
104+
}
105+
106+
.arrows path.a1 {
107+
animation-delay: -1s;
108+
-webkit-animation-delay: -1s; /* Safari 和 Chrome */
109+
}
110+
111+
.arrows path.a2 {
112+
animation-delay: -0.5s;
113+
-webkit-animation-delay: -0.5s; /* Safari 和 Chrome */
114+
}
115+
116+
.arrows path.a3 {
117+
animation-delay: 0s;
118+
-webkit-animation-delay: 0s; /* Safari 和 Chrome */
119+
}

my-app/src/pages/Home.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ const Home = () => {
1414
</div>
1515
<div className="image float-right" />
1616
</div>
17+
<svg class="arrows">
18+
<path class="a1" d="M0 0 L30 32 L60 0"></path>
19+
<path class="a2" d="M0 20 L30 52 L60 20"></path>
20+
<path class="a3" d="M0 40 L30 72 L60 40"></path>
21+
</svg>
1722
</div>
1823
<div className="home text">
1924
<div className="title">

0 commit comments

Comments
 (0)