From 4bb82c6a8afc08411832451cbbaec330b61c81bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com> Date: Tue, 28 Mar 2023 09:45:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E8=AF=BE=E7=A8=8Bhover?= =?UTF-8?q?=E5=8A=A8=E7=94=BB=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/compenents/courses-model.module.scss | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pages/index/compenents/courses-model.module.scss b/src/pages/index/compenents/courses-model.module.scss index f4d59fa..487615f 100644 --- a/src/pages/index/compenents/courses-model.module.scss +++ b/src/pages/index/compenents/courses-model.module.scss @@ -1,10 +1,14 @@ -@keyframes scaleMarginTop { +@keyframes scaleTransTop { 0% { - margin-top: 0; + transform: translateY(0px); + } + + 50% { + transform: translateY(-2px); } 100% { - margin-top: -5px; + transform: translateY(-5px); } } .item { @@ -20,7 +24,7 @@ cursor: pointer; &:hover { box-shadow: 0px 4px 16px 8px rgba(0, 0, 0, 0.04); - animation: scaleMarginTop 0.5s; + animation: scaleTransTop 0.3s; } .top-content { width: 100%;