diff --git a/index.html b/index.html new file mode 100644 index 0000000..2f0b9ab --- /dev/null +++ b/index.html @@ -0,0 +1,21 @@ + + + + + + Is Joe Biden Dead? + + + + +
+

No

+ Joe Biden +
+
+ + + + \ No newline at end of file diff --git a/joe-biden.png b/joe-biden.png new file mode 100644 index 0000000..1dc3a5e Binary files /dev/null and b/joe-biden.png differ diff --git a/script.js b/script.js new file mode 100644 index 0000000..5f7d300 --- /dev/null +++ b/script.js @@ -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 }); +}); \ No newline at end of file diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..1886ea5 --- /dev/null +++ b/styles.css @@ -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; +} \ No newline at end of file