-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from RAHUL956777/main
solve some error but background still not working
- Loading branch information
Showing
6 changed files
with
91 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,63 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
.scene { | ||
position: relative; | ||
width: 100%; | ||
height: 100vh; | ||
background: #01070a; | ||
overflow: hidden; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
position: relative; | ||
width: 100%; | ||
height: 100vh; | ||
background: #01070a; | ||
overflow: hidden; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.scene i { | ||
position: absolute; | ||
top: -250px; | ||
background: rgba(255, 255, 255, 0.5); | ||
animation: animateStars linear infinite; | ||
position: absolute; | ||
top: -250px; | ||
background: rgba(255, 255, 255, 0.5); | ||
animation: animateStars linear infinite; | ||
} | ||
|
||
@keyframes animateStars { | ||
0% { | ||
transform: translateY(0); | ||
} | ||
100% { | ||
transform: translateY(200vh); | ||
} | ||
0% { | ||
transform: translateY(0); | ||
} | ||
100% { | ||
transform: translateY(200vh); | ||
} | ||
} | ||
|
||
.rocket { | ||
position: relative; | ||
animation: animate 0.2s ease infinite; | ||
position: relative; | ||
animation: animate 0.2s ease infinite; | ||
} | ||
|
||
@keyframes animate { | ||
0%, | ||
100% { | ||
transform: translateX(-2px); | ||
} | ||
50% { | ||
transform: translateX(2px); | ||
} | ||
0%, | ||
100% { | ||
transform: translateX(-2px); | ||
} | ||
50% { | ||
transform: translateX(2px); | ||
} | ||
} | ||
|
||
.rocket::before, | ||
.rocket::after { | ||
content: ""; | ||
position: absolute; | ||
bottom: -200px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
width: 10px; | ||
height: 200px; | ||
background: linear-gradient(#00d0ff, transparent); | ||
content: ""; | ||
position: absolute; | ||
bottom: -200px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
width: 10px; | ||
height: 200px; | ||
background: linear-gradient(#00d0ff, transparent); | ||
} | ||
|
||
.rocket::after { | ||
filter: blur(20px); | ||
filter: blur(20px); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,41 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Document</title> | ||
<link rel="stylesheet" href="rocket.css"> | ||
<link rel="stylesheet" href="rocket.css" type="text/css" /> | ||
</head> | ||
<body id="loading-page"> | ||
<div class="scene"> | ||
<div class="rocket"> | ||
<img src="rocket.png" alt="rocket"> | ||
<img src="/rocket.png" alt="rocket" /> | ||
</div> | ||
</div> | ||
<script src="script.js"></script> | ||
|
||
<script> | ||
// animation | ||
function stars() { | ||
varcount = 50; | ||
var scene = document.querySelector(".scene"); | ||
var i = 0; | ||
while (i < count) { | ||
var star = document.createElement("i"); | ||
var x = Math.floor(Math.random() * window.innerWidth); | ||
var duration = Math.random() * 1; | ||
var h = Math.random() * 100; | ||
|
||
star.style.left = x + "px"; | ||
star.style.width = "1px"; | ||
star.style.height = 50 + h + "px"; | ||
star.style.animationDuration = duration + "s"; | ||
|
||
scene.appendChild(star); | ||
i++; | ||
} | ||
} | ||
stars(); | ||
</script> | ||
<script src="/script.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,14 @@ | ||
|
||
// animation | ||
function stars() { | ||
let count = 50; | ||
let scene = document.querySelector(".scene"); | ||
let i = 0; | ||
while (i < count) { | ||
let star = document.createElement("i"); | ||
let x = Math.floor(Math.random() * window.innerWidth); | ||
let duration = Math.random() * 1; | ||
let h = Math.random() * 100; | ||
|
||
star.style.left = x + "px"; | ||
star.style.width = "1px"; | ||
star.style.height = 50 + h + "px"; | ||
star.style.animationDuration = duration + "s"; | ||
|
||
scene.appendChild(star); | ||
i++; | ||
} | ||
function openRocket() { | ||
const xhr = new XMLHttpRequest(); | ||
xhr.open("GET", "/rocket.html", true); | ||
xhr.onreadystatechange = () => { | ||
if (xhr.readyState === 4 && xhr.status === 200) { | ||
document.documentElement.innerHTML = xhr.responseText; | ||
setTimeout(() => { | ||
window.location.href = "/sec-page/second.html"; | ||
}, 5000); | ||
} | ||
}; | ||
xhr.send(); | ||
} | ||
stars(); | ||
|
||
function stars() { | ||
let count = 50; | ||
let scene = document.querySelector(".scene"); | ||
let i = 0; | ||
while (i < count) { | ||
let star = document.createElement("i"); | ||
let x = Math.floor(Math.random() * window.innerWidth); | ||
let duration = Math.random() * 1; | ||
let h = Math.random() * 100; | ||
|
||
star.style.left = x + "px"; | ||
star.style.width = "1px"; | ||
star.style.height = 50 + h + "px"; | ||
star.style.animationDuration = duration + "s"; | ||
|
||
scene.appendChild(star); | ||
i++; | ||
} | ||
} | ||
stars(); | ||
|
||
|
||
function startAnimation() { | ||
let loadingPage = document.getElementById('loading-page'); | ||
loadingPage.classList.add('animate'); | ||
|
||
// Wait for the animation to complete (adjust the duration as needed) | ||
setTimeout(function () { | ||
// Redirect to the new page after animation completes | ||
window.location.href = 'newpage.html'; | ||
}, 2000); // 2 seconds (adjust the duration as needed) | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters