this post was submitted on 01 Jul 2025
2 points (100.0% liked)

HTML

385 readers
3 users here now

founded 2 years ago
MODERATORS
 

My website's home page is meant to look like a star system, with a sun in the middle and planets (links to parts of the site) orbiting around it. That's how it is currently (here, scroll down and right a little).

What i'm struggling with now is making moons that can orbit planets orbiting the sun. I've tried moving a planet's inline CSS into a element around that planet's link and picture, and then adding another planet to that , but i can't figure out how to make it orbit around the parent planet instead of around the sun.

I did see this Codepen example, but it works differently from how the rest of my orbits are set up. It seems to rotate planets from an offset center, rather than moving them on a circular path without rotating them. And i couldn't figure out how to adapt its moon movement to my page.

Is there a good way to do what i'm trying to do, besides rewriting my page to work like the Codepen one? Thanks in advance.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here