It's surprisingly simple! I designed an SVG quick in Sketch, and did it in a way where I can shift things left to right. Then a few CSS animations just move things left to right. When rotated, it looks like it's rocking!
What does it mean that the image can be shifted from left to right? Just out of curiosity, because I thought at some examples such as a circle, but maybe not some complex shape?
Here's the initial SVG: https://p195.p4.n0.cdn.getcloudapp.com/items/OAuqBqvx/boat.s...
Everything else was just CSS