[英]How do I animate a Svg path vertically?
我想為這條路徑上下(垂直)設置動畫。 我為此使用了animationMotion,但我的路徑正朝着不同的方向移動。
<svg width="698" height="745" viewBox="0 0 698 645" fill="none" xmlns="http://www.w3.org/2000/svg"> <path id="bottom-arrow" d="M404.767 578.541L414.523 592.852L397.251 594.146L404.767 578.541Z" stroke="#EEE8FB" stroke-width="2" > <animateMotion path="M0,0 0 50 90 0 90 10" begin="0s" dur="2s" repeatCount="indefinite" /> </path> </svg>
希望你明白我的意思
您只需要為 animateMotion 提供正確的路徑。 在您的代碼中,它應該是path="M0,0 0 90 0 0"
有關更多信息,請查看此鏈接
<svg width="698" height="745" viewBox="0 0 698 645" fill="none" xmlns="http://www.w3.org/2000/svg"> <path id="bottom-arrow" d="M404.767 578.541L414.523 592.852L397.251 594.146L404.767 578.541Z" stroke="#EEE8FB" stroke-width="2" > <animateMotion path="M0,0 0 90 0 0" begin="0s" dur="2s" repeatCount="indefinite" /> </path> </svg>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.