From b37279e7a187d062e6e3305b8f57d1cf15c6b562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignacio=20G=C3=B3mez=20Rodr=C3=ADguez?= Date: Sun, 9 Feb 2025 19:15:56 -0300 Subject: [PATCH] Add move animation to cursor --- 03-midu-typing-game/index.html | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/03-midu-typing-game/index.html b/03-midu-typing-game/index.html index 83e5488..a842062 100644 --- a/03-midu-typing-game/index.html +++ b/03-midu-typing-game/index.html @@ -56,8 +56,9 @@ color: var(--yellow); font-size: 14px; position: absolute; - left: -65%; - animation: 1s blink infinite ease-in-out; + left: -35%; + transition: 0.1s; + animation: 1s blink infinite ease-in-out, move 0.1s ease-in-out; } &.active.is-last::before { @@ -94,6 +95,16 @@ } } + @keyframes move { + 0% { + left: -65%; + } + + 100% { + left: -40%; + } + } + #game { display: flex; } @@ -344,4 +355,4 @@

$wpm.textContent = wpm $accuracy.textContent = `${accuracy.toFixed(2)}%` } - \ No newline at end of file +