У меня есть две линии, красная и синяя, где синяя линия движется по красной линии. Я хочу, чтобы синяя линия двигалась вверх и вниз по красной линии, а здесь она движется только вверх. Ниже приведен код
<!DOCTYPE html>
<html>
<head><title></title>
</head>
<body>
<svg height="210" width="500">
<line x1="0" y1="0" x2="200" y2="200" style="stroke:rgb(255,0,0);stroke-width:2" />
<line x1="150" y1="150" x2="200" y2="200" style="stroke:rgb(0, 0, 153);stroke-width:2">
<animateTransform attributeName="transform"
type="translate"
from="200 200"
to="-150 -150"
begin="0s"
dur="5s"
repeatCount="indefinite"
/>
</line>
</svg>
</body>
</html>