From: Ardis Lu Date: Wed, 13 Dec 2023 05:24:22 +0000 (-0800) Subject: Add "grow on hover" card X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=6de3c0227d756ecb4a1f05b05a6717a4f071d60f;p=css-loaders Add "grow on hover" card --- diff --git a/index.html b/index.html index 462d4d4..f5ddad4 100644 --- a/index.html +++ b/index.html @@ -284,6 +284,20 @@ transition: max-height 1700ms; } + .card.hover-grow { + margin-block: 8px; + border: 1px solid hsl(0deg 0% 70%); + border-radius: 12px; + will-change: transform; + transition: scale 400ms; + } + + .card.hover-grow:hover, + .card.hover-grow:focus-within { + scale: 105%; + transition: scale 200ms; + } + /* Button hovers */ button { @@ -524,6 +538,11 @@

This card's detail will rise from the bottom when the card is hovered or focused.

+ +
+

Grow on hover

+

This card will grow larger when the card is hovered or focused.

+