summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jones <daniel@danieljon.es>2025-02-15 01:25:40 +1100
committerDaniel Jones <daniel@danieljon.es>2025-02-15 01:25:40 +1100
commit55edc1f1f1c29e355a8abda183c00d4026e422ce (patch)
treebc13cec1eabcad273cf6c9faca04c5c6a7ff6059
parent43152362e6b25c03a8a0022a87dfbf43e930d827 (diff)
downloadwebsitegenerator-55edc1f1f1c29e355a8abda183c00d4026e422ce.tar.gz
websitegenerator-55edc1f1f1c29e355a8abda183c00d4026e422ce.zip
make rem jump on click
-rw-r--r--template.txt32
1 files changed, 22 insertions, 10 deletions
diff --git a/template.txt b/template.txt
index a8c73e0..e08a98a 100644
--- a/template.txt
+++ b/template.txt
@@ -155,19 +155,31 @@ animation: run-sprite 8s linear infinite;
transform: scaleX(1);
z-index: 1;
}
+
+/* Option 1: Jump when clicked */
.running-sprite2 {
-position: fixed;
-bottom: 5px;
-left: 0;
-width: 60px; /* Adjust based on your sprite's actual size */
-height: 60px; /* Adjust based on your sprite's actual size */
-background-image: url('https://danieljones.au/media/rem_run.gif');
-background-size: cover;
-animation: run-sprite 15s linear infinite;
-transform: scaleX(1);
-z-index: 1;
+ position: fixed;
+ bottom: 5px;
+ left: 0;
+ width: 60px;
+ height: 60px;
+ background-image: url('https://danieljones.au/media/rem_run.gif');
+ background-size: cover;
+ animation: run-sprite 15s linear infinite;
+ transform: scaleX(1);
+ z-index: 1;
+ cursor: pointer;
+ transition: bottom 0.2s ease-out;
+}
+
+.running-sprite2:active {
+ bottom: 50px;
}
+@keyframes jump {
+ 0%, 100% { bottom: 5px; }
+ 50% { bottom: 50px; }
+}
@keyframes run-sprite {
0% {
left: 0;