File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < link rel ="stylesheet " href ="styles/style.css ">
5+ </ head >
6+ < body >
7+ < div class ="space-container ">
8+ < div class ="stars "> </ div >
9+ < div class ="astronaut "> 👩🚀</ div >
10+ </ div >
11+ </ body >
12+ </ html >
Original file line number Diff line number Diff line change 1+ /* Basic Reset */
2+ body , html {
3+ margin : 0 ;
4+ padding : 0 ;
5+ height : 100% ;
6+ overflow : hidden;
7+ background-color : # 050505 ;
8+ }
9+
10+ /* 1. The Space Background */
11+ .space-container {
12+ width : 100vw ;
13+ height : 100vh ;
14+ display : flex;
15+ justify-content : center;
16+ align-items : center;
17+ background : radial-gradient (ellipse at bottom, # 1B2735 0% , # 090A0F 100% );
18+ }
19+
20+ /* 2. The Floating Astronaut */
21+ .astronaut {
22+ font-size : 80px ;
23+ position : relative;
24+ /* Apply the 'float' animation: 3 seconds, infinite loop, smooth easing */
25+ animation : float 4s ease-in-out infinite;
26+ }
27+
28+ /* 3. Defining the Float Animation */
29+ @keyframes float {
30+ 0% {
31+ transform : translateY (0px ) rotate (0deg );
32+ }
33+ 50% {
34+ transform : translateY (-50px ) rotate (10deg );
35+ }
36+ 100% {
37+ transform : translateY (0px ) rotate (0deg );
38+ }
39+ }
40+
41+ /* 4. Moving Stars background */
42+ .stars {
43+ position : absolute;
44+ top : 0 ; left : 0 ; right : 0 ; bottom : 0 ;
45+ background : transparent url ('https://www.transparenttextures.com/patterns/stardust.png' ) repeat;
46+ animation : move-stars 100s linear infinite;
47+ }
48+
49+ @keyframes move-stars {
50+ from { background-position : 0 0 ; }
51+ to { background-position : -10000px 5000px ; }
52+ }
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < link rel ="stylesheet " href ="styles.css ">
5+ </ head >
6+ < body >
7+ < div class ="space-container ">
8+ < div class ="stars "> </ div >
9+ < div class ="astronaut "> 👩🚀</ div >
10+ </ div >
11+ </ body >
12+ </ html >
Original file line number Diff line number Diff line change 1+ {
2+ "artName" : " astronaut" ,
3+ "githubHandle" : " phaamdeen"
4+ }
Original file line number Diff line number Diff line change 1+ /* Basic Reset */
2+ body , html {
3+ margin : 0 ;
4+ padding : 0 ;
5+ height : 100% ;
6+ overflow : hidden;
7+ background-color : # 050505 ;
8+ }
9+
10+ /* 1. The Space Background */
11+ .space-container {
12+ width : 100vw ;
13+ height : 100vh ;
14+ display : flex;
15+ justify-content : center;
16+ align-items : center;
17+ background : radial-gradient (ellipse at bottom, # 1B2735 0% , # 090A0F 100% );
18+ }
19+
20+ /* 2. The Floating Astronaut */
21+ .astronaut {
22+ font-size : 80px ;
23+ position : relative;
24+ /* Apply the 'float' animation: 3 seconds, infinite loop, smooth easing */
25+ animation : float 4s ease-in-out infinite;
26+ }
27+
28+ /* 3. Defining the Float Animation */
29+ @keyframes float {
30+ 0% {
31+ transform : translateY (0px ) rotate (0deg );
32+ }
33+ 50% {
34+ transform : translateY (-50px ) rotate (10deg );
35+ }
36+ 100% {
37+ transform : translateY (0px ) rotate (0deg );
38+ }
39+ }
40+
41+ /* 4. Moving Stars background */
42+ .stars {
43+ position : absolute;
44+ top : 0 ; left : 0 ; right : 0 ; bottom : 0 ;
45+ background : transparent url ('https://www.transparenttextures.com/patterns/stardust.png' ) repeat;
46+ animation : move-stars 100s linear infinite;
47+ }
48+
49+ @keyframes move-stars {
50+ from { background-position : 0 0 ; }
51+ to { background-position : -10000px 5000px ; }
52+ }
You can’t perform that action at this time.
0 commit comments