From e76620d51bbdc11dd962b5bdbb24bd48bbaad3e1 Mon Sep 17 00:00:00 2001 From: Sam Hadow Date: Wed, 29 Jan 2025 18:53:14 +0100 Subject: [PATCH] glow animation when winning --- style.css | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/style.css b/style.css index 578a514..91dec3f 100644 --- a/style.css +++ b/style.css @@ -18,8 +18,28 @@ td { background-color: yellow; } .winning1 { - box-shadow: 5px 5px 5px 5px red; + border: solid 0.2em red; + animation: glow1 1s infinite alternate; } .winning2 { - box-shadow: 5px 5px 5px 5px yellow; + border: solid 0.2em yellow; + animation: glow2 1s infinite alternate; +} + +@keyframes glow1 { + from { + box-shadow: 0 0 10px -10px #ba4551; + } + to { + box-shadow: 0 0 10px 10px #ba4551; + } +} + +@keyframes glow2 { + from { + box-shadow: 0 0 10px -10px #eff285; + } + to { + box-shadow: 0 0 10px 10px #eff285; + } }