🗒️运动路径
animating an element along a defined path
<div id="motion-demo"></div>#motion-demo {
offset-path: path("M20,20 C20,100 200,0 200,100");
animation: move 3000ms infinite alternate ease-in-out;
width: 40px;
height: 40px;
background: lightseagreen;
}
@keyframes move {
0% {
offset-distance: 0%;
}
100% {
offset-distance: 100%;
}
}1. offset-path
offset-path2. offset-position
offset-position3. path()
path()4. <path>
<path>4.1 属性 d
d4.2 画 line
4.3 画 curve
三次曲线



二次曲线



圆弧
主要参考
Last updated