not working
This commit is contained in:
@ -13,6 +13,13 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hopping-rabbit {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
width: 100px;
|
||||
animation: bunny-move 10s linear infinite, bunny-hop 1s ease-in-out infinite;
|
||||
}
|
||||
|
||||
/*
|
||||
@media (max-width: 768px) {
|
||||
#rabbit {
|
||||
@ -37,7 +44,6 @@
|
||||
-webkit-animation-duration: 7s, 3s;
|
||||
-webkit-animation-timing-function: linear, ease-in-out;
|
||||
-webkit-animation-iteration-count: infinite, infinite;
|
||||
-webkit-user-select: none;
|
||||
animation-name: easter-fall, easter-shake;
|
||||
animation-duration: 7s, 3s;
|
||||
animation-timing-function: linear, ease-in-out;
|
||||
@ -97,23 +103,19 @@
|
||||
|
||||
@keyframes bunny-move {
|
||||
0% {
|
||||
top: -10%;
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
100% {
|
||||
top: 100%;
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes bunny-hop {
|
||||
|
||||
0%,
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
0%, 100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translateX(80px);
|
||||
transform: translateY(-30px);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -127,6 +127,7 @@ function addRandomEaster(count) {
|
||||
console.log('Random easter added');
|
||||
}
|
||||
|
||||
/*
|
||||
function addHoppingRabbit() {
|
||||
if (!bunny) return; // only add the bunny if bunny is enabled
|
||||
|
||||
@ -166,6 +167,25 @@ function addHoppingRabbit() {
|
||||
easterContainer.appendChild(rabbitDiv);
|
||||
hop();
|
||||
}
|
||||
*/
|
||||
|
||||
function addHoppingRabbit() {
|
||||
if (!bunny) return; // Nur ausführen, wenn Easter aktiviert ist
|
||||
|
||||
const easterContainer = document.querySelector('.easter-container');
|
||||
if (!easterContainer) return;
|
||||
|
||||
// Hase erstellen
|
||||
const rabbitImg = document.createElement("img");
|
||||
rabbitImg.id = "rabbit";
|
||||
rabbitImg.src = rabbit; // Bildpfad aus der bestehenden Definition
|
||||
rabbitImg.alt = "Hoppelnder Osterhase";
|
||||
|
||||
// CSS-Klassen hinzufügen
|
||||
rabbitImg.classList.add("hopping-rabbit");
|
||||
|
||||
easterContainer.appendChild(rabbitImg);
|
||||
}
|
||||
|
||||
// initialize standard easter
|
||||
function initEaster() {
|
||||
|
Reference in New Issue
Block a user