From 6037f68b7a004e8e2535d501b36d9a76fb111628 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Tue, 25 Aug 2026 01:36:07 +0800 Subject: [PATCH] New animation next-bounce --- .../_common/components/post/post-reward.styl | 38 ++++++++++++++++--- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/source/css/_common/components/post/post-reward.styl b/source/css/_common/components/post/post-reward.styl index 17f1f1c..4216904 100644 --- a/source/css/_common/components/post/post-reward.styl +++ b/source/css/_common/components/post/post-reward.styl @@ -28,11 +28,21 @@ } if (hexo-config('reward_settings.animation')) { + span { + transform-origin: center bottom; + } + &:hover span { - animation: next-roll .1s infinite linear; + animation: next-bounce 1.4s infinite ease-in-out; // The animation may affect :hover of img in dark mode pointer-events: none; } + + @media (prefers-reduced-motion: reduce) { + &:hover span { + animation: none; + } + } } } @@ -44,12 +54,28 @@ } } -@keyframes next-roll { - from { - transform: rotateZ(30deg); +@keyframes next-bounce { + 0%, 100% { + transform: translateY(0) scale(1); } - to { - transform: rotateZ(-30deg); + 12% { + transform: translateY(0) scale(1.04, .96); + } + + 36% { + transform: translateY(-7px) scale(.98, 1.02); + } + + 58% { + transform: translateY(0) scale(1.03, .97); + } + + 72% { + transform: translateY(-2px) scale(1); + } + + 84% { + transform: translateY(0) scale(1); } }