发布于 2022-08-02 04:32:26
需要使用svg路径填充动画,如
.line {
stroke-dasharray: 280 280;
stroke-dashoffset: 280;
animation-duration: 2s;
animation-name: draw;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-timing-function: linear;
}
@keyframes draw {
from {
stroke-dashoffset: 280;
}
to {
stroke-dashoffset: 0;
}
}
<svg>
<path class="line" d="M 10,75 L 290,75" stroke="green" stroke-width="50"/>
</svg>
https://stackoverflow.com/questions/73201934
复制相似问题