Solar-System

Solar System Animation

This repository contains a simple HTML and CSS code snippet that creates an animated representation of the solar system. It displays the sun, Earth, and a moon orbiting around it, along with a larger planet resembling Jupiter.

https://github.com/QC20/Solar-System/assets/36644388/b4281bc9-f147-4d8f-947f-635c84e013eb

Structure

The code is structured as follows:

Special Features

  1. Animation: The solar system animation is achieved using CSS keyframe animations. The Earth orbits around the sun, and the moon orbits around the Earth. The animation is set to loop infinitely and rotates the elements to give a sense of motion.

  2. Realistic Design: The sizes and colors of the elements are chosen to represent the relative scale of the sun, Earth, and moon in a simplified manner. The sun is depicted as a yellow circle, while the Earth is a larger aqua-colored circle with a smaller silver-colored circle representing the moon.

  3. Responsiveness: The animation is designed to be responsive and adapt to different screen sizes. The container element is centered on the screen using flexbox, and its dimensions are defined using relative units to ensure proper scaling.

Usage

To use this code snippet, follow these steps:

  1. Clone this repository to your local machine or download the index.html file directly.

  2. Open the index.html file in a web browser.

  3. The animation should start automatically, displaying the solar system with the Earth and moon orbiting around the sun.

Feel free to modify the code and customize it according to your needs. You can adjust the sizes, colors, animation duration, or add more elements to the animation.

Credits

This code snippet was created by [your name].