-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVenus.html
199 lines (173 loc) · 5.92 KB
/
Venus.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
195
196
197
198
199
<!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;
box-shadow: 100px blue;
animation: scaleup 10s linear none;
}
.planet{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 300px;
height: 300px;
background:url("./assets/venus.jpg");
border-radius: 50%;
background-size:cover;
background-repeat: repeat-x;
box-shadow: inset 50px 0 10px rgba(0, 0, 0, 0.541), 0 0 30px rgb(175, 169, 86);
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: 1200px 0;
}
}
div{ display:flex;
flex-direction: column;
height: 50%;
width: 300px;
position: absolute;
top: 25%;
left: 5%;
animation: opmy 2s linear none;
}
h1{
color: rgb(180, 157, 54);
text-shadow:2px 2px 10px black;
}
p{
color:rgb(238, 228, 183);
text-shadow:2px 2px 10px black;
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>Venus</title>
</head>
<body>
<section>
<div class="planet"></div></section>
<div class="aboutPlanet"><h1>VENUS</h1><br>
<p id="textContent">
</p>
<button type="button" class="btn" id="btn" onclick="speech()"><img style="width: 30%;" class="speechbutton" src="https://cdn-icons-png.flaticon.com/512/26/26706.png" alt=""></button></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 =`Venus is the second planet from the Sun and is Earth’s closest planetary neighbor. It’s one of the four inner, terrestrial (or rocky) planets and it’s often called Earth’s twin because it’s similar in size and density. These are not identical twins however – there are radical differences between the two worlds . Venus is also the hottest planet of solar system `;
let idx =1;
let speed = 50;
writeText()
speech()
function writeText() {
textTag.innerText = textCtnt.slice(0, idx)
idx++
setTimeout(writeText, speed)
}
function speech(e){
let button = document.querySelector("#btn")
const text_box =textCtnt
const text= new SpeechSynthesisUtterance(text_box);
speechSynthesis.speak(text);
}
</script>
</body>
</html>