4umi.com/web/javascript/solarsystem

Solar System Script

Just like the real thing, the Moon revolves around the Earth, and the Earth revolves around the Sun. These motions are independent of each other. Since the Moon layer, like a true satellite, is nested within the Earth layer, it will follow wherever the Earth goes. View the source code of the page and the external javascript files dynlayer.js and dyncircle.js to see how it was done.
Back.
Sun
Earth
Moon