Animate an element on a sine path
问题 I neeed to move an element on sine wave or path as shown in above image. I made something. But it is not working as I want. img { position:absolute; animation: roam infinite; animation-duration: 15s; } @keyframes roam { 0% { left: 50px; top:100px } 10%{ left:100px; top:100px } 20%{ left:200px; top:200px } 30%{ left:300px; top:50px } 40%{ left:400px; top:200px } } <img src="https://developer.chrome.com/extensions/examples/api/idle/idle_simple/sample-128.png"> 回答1: You can move an element on a