Escalade|Escalade loading
文章图片
ezgif.com-video-to-gif.gif HTML
【Escalade|Escalade loading】
CSS
$transition-duration: 2s;
$path-length: 157px;
// Retrieved using SVG's getTotalLength()html, body {
width: 100%;
height: 100%;
}body {
display: flex;
align-items: center;
justify-content: center;
}svg {
overflow: visible;
width: 100px;
height: 150px;
g {
animation: slide $transition-duration linear infinite;
&:nth-child(2) {
animation-delay: $transition-duration / 4;
path {
animation-delay: $transition-duration / 4;
stroke-dasharray: 0px $path-length + 1;
stroke-dashoffset: 1px;
}
}
}path{
stroke: url(#gradient);
stroke-width: 20px;
stroke-linecap: round;
fill: none;
stroke-dasharray: 0 $path-length;
stroke-dashoffset: 0;
animation: escalade $transition-duration cubic-bezier(0.8, 0, 0.2, 1) infinite;
}
}@keyframes slide {
0% {
transform: translateY(-50px);
}
100% {
transform: translateY(50px);
}
}@keyframes escalade {
0% {
stroke-dasharray: 0 $path-length;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: $path-length - 1 $path-length;
stroke-dashoffset: 0;
}
100% {
stroke-dasharray: $path-length - 1 $path-length;
stroke-dashoffset: -($path-length - 1);
}
}
推荐阅读
- 宽容谁
- 一个人的旅行,三亚
- 第6.2章(设置属性)
- 布丽吉特,人生绝对的赢家
- 家乡的那条小河
- 讲述,美丽聪明的海欧!
- PMSJ寻平面设计师之现代(Hyundai)
- 夜游宫|夜游宫 心语
- 增长黑客的海盗法则
- 画画吗()