-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMars.html
194 lines (164 loc) · 5.48 KB
/
Mars.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
background: url(https://wallpapercave.com/wp/wp3493599.jpg);
background-size: cover;
background-attachment: fixed;
background-position: center;
}
section{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
transform-style: preserve-3d;
animation: scaleup 10s linear none;
}
.planet{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 300px;
height: 300px;
background:url("./assets/mars.jpg");
border-radius: 50%;
background-size:cover;
background-repeat: repeat-x;
box-shadow: inset 50px 0 10px rgba(0, 0, 0, 0.856), 0 0 30px rgb(245, 152, 109);
animation: rotation 20s linear infinite ;}
@keyframes scaleup {
0%{
transform: scale(0.5);
}
100%{
transform: scale(1);
}
}
@keyframes rotation {
0%{
background-position: 0 0;
}
100%{
background-position: -1280px 0;
}
}
div{ display:flex;
flex-direction: column;
height: 50%;
width: 300px;
position: absolute;
top: 25%;
left: 5%;
animation: opmy 2s linear none;
}
h1{
color:red;
text-shadow:2px 2px 10px rgb(243, 107, 107);
}
p{
color:rgba(248, 147, 147, 0.952);
text-shadow:2px 2px 10px rgb(255, 15, 15);
font-size: larger;
}
@keyframes opmy {
0%{
opacity: 0;
transform: translate(-20px,0px);
}100%{
opacity: 1;
}}
button{
height: 30px;
width: 80px;
color:cyan;
background-color: rgb(100, 22, 173);
border: 2px solid black;
border-radius: 20px;
text-shadow:0 0 10px black ;
}
button:hover{
cursor: pointer;
background-color: blueviolet;
transform: scale(1.1);
}
button:active{
transform: scale(0.92);
}
footer{
position:fixed;
bottom: 10px;
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content:center ;
align-items: center;
}@media screen and (orientation: portrait){
.aboutPlanet{
display:flex;
flex-direction: column;
height: 50%;
width: 90%;
position: absolute;
top: 1%;
left: 5%;
animation: opmy 2s linear none;
}
h1{
font-size: x-large;
}
p{
font-size: 15px;
}
.btn{
width: 10%;
}
}
</style>
<title>Mars</title>
</head>
<body>
<section>
<div class="planet"></div></section> <div class="aboutPlanet"><h1>MARS</h1><br>
<p id="textContent">
</p>
</div>
<footer>
<a href="index.html"><button type="button">HOME</button></a>
<a href="Sun.html"><button type="button">SUN</button></a>
<a href="Mercury.html"><button >MERCURY </button></a>
<a href="Venus.html"><button>VENUS </button></a>
<a href="Earth.html"><button>EARTH </button></a>
<a href="Moon.html"><button>MOON </button></a>
<a href="Mars.html"><button>MARS </button></a>
<a href="jupiter.html"><button>JUPITER </button></a>
<a href="Saturn.html"><button>SATURN </button></a>
<a href="Uranus.html"><button>URANUS</button></a>
<a href="Neptune.html"><button>NEPTUNE </button></a>
<a href="Pluto.html"><button>PLUTO </button></a>
</footer>
<script>
let textTag=document.getElementById("textContent");
let textCtnt =`Mars is the fourth planet from the Sun – a dusty cold, desert world with a very thin atmosphere. Mars is also a dynamic planet with seasons, polar ice caps, canyons, extinct volcanoes, and evidence that it was even more active in the past......
......Mars is one of the most explored bodies in our solar system, and it's the only planet where we've sent rovers to roam the alien landscape`;
let idx =1;
let speed = 45;
writeText()
function writeText() {
textTag.innerText = textCtnt.slice(0, idx)
idx++
setTimeout(writeText, speed)
}
</script>
</body>
</html>