Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a CSS Solar System in frontend projects #1033

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions Front-end-Projects/Basic/CSS Solar System/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<h1 align='center'><b>💥 CSS Solar System 💥</b></h1>

<!-- -------------------------------------------------------------------------------------------------------------- -->

<h3 align='center'>Tech Stack Used 🎮</h3>


<div align='center'>

![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white)
![CSS3](https://img.shields.io/badge/css3-%231572B6.svg?style=for-the-badge&logo=css3&logoColor=white)

</div>


![Line](https://github.com/Avdhesh-Varshney/WebMasterLog/assets/114330097/4b78510f-a941-45f8-a9d5-80ed0705e847)

<!-- -------------------------------------------------------------------------------------------------------------- -->

## :zap: Description 📃

<div>
<p> The CSS Solar System is a visually immersive representation of our solar system, crafted entirely with HTML and CSS. This project features a realistic arrangement of planets orbiting the sun, each with carefully scaled sizes and orbital paths. Through the use of CSS animations and transformations, each planet follows its unique orbit, capturing the beauty and motion of celestial bodies. This project demonstrates creative and technical CSS skills by simulating complex motion without JavaScript, offering an interactive and educational visualization of the solar system for viewers.</p>
</div>


<!-- -------------------------------------------------------------------------------------------------------------- -->

## :zap: How to run it? 🕹️

<div>
<p>To run this project locally, follow these steps:

1. Fork the repository.

2. Clone the repository to your local machine:
git clone

3. Open the project folder in your preferred code editor, now you can view website in live.

</p>
</div>

<!-- -------------------------------------------------------------------------------------------------------------- -->

## :zap: Screenshots 📸
<!-- add the screenshot of the project (Mandatory) -->

![Screenshot (38)](https://github.com/user-attachments/assets/0050b66c-eb63-4cb6-8b97-056f4bb22f92)



![Line](https://github.com/Avdhesh-Varshney/WebMasterLog/assets/114330097/4b78510f-a941-45f8-a9d5-80ed0705e847)

<!-- -------------------------------------------------------------------------------------------------------------- -->

<h4 align='center'>Developed By <b><i>Arzoo Singh</i></b></h4>
<p align='center'>
<a href='https://www.linkedin.com/in/arzoo-singh-4192b324a/'>
<img src='https://img.shields.io/badge/linkedin-%230077B5.svg?style=for-the-badge&logo=linkedin&logoColor=white' />
</a>
<a href='github.com/arzoosingh147'>
<img src='https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white' />
</a>
</p>

<h4 align='center'>Happy Coding 🧑‍💻</h4>

<h3 align="center">Show some &nbsp;❤️&nbsp; by &nbsp;🌟&nbsp; this repository!</h3>
22 changes: 22 additions & 0 deletions Front-end-Projects/Basic/CSS Solar System/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>
<ol>
<li class="sun"></li>
<li class="mercury"></li>
<li class="venus"></li>
<li class="earth"></li>
<li class="mars"></li>
<li class="jupiter"></li>
<li class="saturn"></li>
<li class="uranus"></li>
<li class="neptune"></li>
</ol>
</body>
</html>
110 changes: 110 additions & 0 deletions Front-end-Projects/Basic/CSS Solar System/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@

body {
background: #000F;
color: #FFFA;
margin: 0;
width: 100vw;
}

ol {
all: unset;
aspect-ratio: 1 / 1;
container-type: inline-size;
display: grid;
width: 100%;
}

li {
aspect-ratio: 1 / 1;
border: 1px dashed;
border-radius: 50%;
display: grid;
grid-area: 1 / 1;
place-self: center;
width: var(--d, 2cqi);
&::after {
animation: rotate var(--t, 3s) linear infinite;
aspect-ratio: 1 / 1;
background: var(--b, hsl(0, 0%, 50%));
border-radius: 50%;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
content: '';
display: block;
offset-path: content-box;
width: var(--w, 2cqi);
}
}

@keyframes rotate {
to {
offset-distance: 100%;
}
}

.sun {
--b: radial-gradient(circle, #f9d71c 0%, #f9a825 50%, #f9a825 100%);
--d: 10cqi;
--w: 8cqi;
border: 0;
&::after {
animation: none;
offset-path: none;
place-self: center;
}
}

.mercury {
--b: radial-gradient(circle, #c2c2c2 0%, #8a8a8a 100%);
--d: 15cqi;
--t: 2105.26ms;
--w: 2.0526cqi;
}

.venus {
--b: radial-gradient(circle, #f4d03f 0%, #c39c43 100%);
--d: 25cqi;
--t: 4210.53ms;
--w: 2.6053cqi;
}

.earth {
--b: radial-gradient(circle, #3a82f7 0%, #2f9e44 80%, #1a5e20 100%);
--d: 35cqi;
--t: 6315.79ms;
--w: 3.1579cqi;
}

.mars {
--b: radial-gradient(circle, #e57373 0%, #af4448 100%);
--d: 45cqi;
--t: 8421.05ms;
--w: 3.7105cqi;
}

.jupiter {
--b: radial-gradient(circle, #d4a373 0%, #b36d32 50%, #f4e7d3 100%);
--d: 60cqi;
--t: 12631.58ms;
--w: 4.8158cqi;
}

.saturn {
--b: radial-gradient(circle, #e6dba0 0%, #c2a13e 100%);
--d: 75cqi;
--t: 14736.84ms;
--w: 5.3684cqi;
}

.uranus {
--b: radial-gradient(circle, #7de3f4 0%, #3ba0b5 100%);
--d: 84.5cqi;
--t: 10526.32ms;
--w: 4.2632cqi;
}

.neptune {
--b: radial-gradient(circle, #4c6ef5 0%, #1b3b8c 100%);
--d: 94cqi;
--t: 20000ms;
--w: 6cqi;
}