Add biden
This commit is contained in:
parent
d3ff05b3a6
commit
fa9945f445
4 changed files with 152 additions and 0 deletions
21
index.html
Normal file
21
index.html
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Is Joe Biden Dead?</title>
|
||||||
|
<link rel="stylesheet" href="styles.css">
|
||||||
|
<link rel="icon" href="joe-biden.png" type="image/png">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<h1>No</h1>
|
||||||
|
<img id="biden-image" src="joe-biden.png" alt="Joe Biden">
|
||||||
|
<div id="mini-photos-container"></div>
|
||||||
|
</div>
|
||||||
|
<footer>
|
||||||
|
<p>by JoJomaw on Twitch</p>
|
||||||
|
</footer>
|
||||||
|
<script src="script.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
BIN
joe-biden.png
Normal file
BIN
joe-biden.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
29
script.js
Normal file
29
script.js
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
document.getElementById('biden-image').addEventListener('click', function() {
|
||||||
|
const container = document.getElementById('mini-photos-container');
|
||||||
|
container.innerHTML = ''; // Clear previous mini photos
|
||||||
|
|
||||||
|
for (let i = 0; i < 10; i++) { // Create 10 mini photos
|
||||||
|
const miniPhoto = document.createElement('img');
|
||||||
|
miniPhoto.src = 'joe-biden.png';
|
||||||
|
miniPhoto.className = 'mini-photo';
|
||||||
|
miniPhoto.style.left = `${Math.random() * 100}%`;
|
||||||
|
miniPhoto.style.top = `${Math.random() * 100}%`;
|
||||||
|
miniPhoto.style.opacity = '1'; // Ensure initial opacity is set to 1
|
||||||
|
container.appendChild(miniPhoto);
|
||||||
|
|
||||||
|
// Trigger animation
|
||||||
|
setTimeout(() => {
|
||||||
|
miniPhoto.style.transform = `translate(${Math.random() * 200 - 100}px, ${Math.random() * 200 - 100}px) scale(0.5)`;
|
||||||
|
miniPhoto.style.opacity = '0'; // Fade out
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add bounce effect to the "NO" text
|
||||||
|
const noText = document.querySelector('h1');
|
||||||
|
noText.classList.add('bounce');
|
||||||
|
|
||||||
|
// Remove the bounce class after the animation ends
|
||||||
|
noText.addEventListener('animationend', function() {
|
||||||
|
noText.classList.remove('bounce');
|
||||||
|
}, { once: true });
|
||||||
|
});
|
||||||
102
styles.css
Normal file
102
styles.css
Normal file
|
|
@ -0,0 +1,102 @@
|
||||||
|
body, html {
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column; /* Allow vertical stacking of elements */
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
/* Use a gradient to represent the USA flag colors */
|
||||||
|
background: linear-gradient(180deg, #3C3B6E 33%, #FFFFFF 33%, #FFFFFF 66%, #B22234 66%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
/* Add a slight shadow to make the text stand out */
|
||||||
|
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 5rem;
|
||||||
|
margin: 0;
|
||||||
|
color: #FFFFFF; /* White text for contrast */
|
||||||
|
margin-right: 20px; /* Space between text and image */
|
||||||
|
/* Add animation properties */
|
||||||
|
animation-duration: 1s;
|
||||||
|
animation-fill-mode: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-height: 400px;
|
||||||
|
width: auto;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#explosion-container {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle {
|
||||||
|
position: absolute;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
background-size: cover;
|
||||||
|
transition: transform 1s ease-out, opacity 1s ease-out;
|
||||||
|
opacity: 1;
|
||||||
|
border: 1px solid red; /* Temporary border for visibility */
|
||||||
|
background-color: yellow; /* Temporary background color for visibility */
|
||||||
|
}
|
||||||
|
|
||||||
|
.mini-biden {
|
||||||
|
position: absolute;
|
||||||
|
width: 30px; /* Size of mini images */
|
||||||
|
height: 30px;
|
||||||
|
transition: transform 1s ease-out, opacity 1s ease-out;
|
||||||
|
pointer-events: none; /* Prevent interaction with mini images */
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin-top: auto; /* Push footer to the bottom */
|
||||||
|
padding: 10px;
|
||||||
|
text-align: center;
|
||||||
|
color: black;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mini-photos-container {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mini-photo {
|
||||||
|
position: absolute;
|
||||||
|
width: 50px; /* Size of mini photos */
|
||||||
|
height: 50px;
|
||||||
|
transition: transform 1s ease-out, opacity 1s ease-out;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes bounce {
|
||||||
|
0%, 20%, 50%, 80%, 100% {
|
||||||
|
transform: translateY(0) scale(1);
|
||||||
|
}
|
||||||
|
40% {
|
||||||
|
transform: translateY(-30px) scale(1.2);
|
||||||
|
}
|
||||||
|
60% {
|
||||||
|
transform: translateY(-15px) scale(1.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bounce {
|
||||||
|
animation-name: bounce;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue