首页课程hover动画优化

This commit is contained in:
禺狨 2023-03-28 09:45:28 +08:00
parent f46078e2b1
commit 4bb82c6a8a

View File

@ -1,10 +1,14 @@
@keyframes scaleMarginTop { @keyframes scaleTransTop {
0% { 0% {
margin-top: 0; transform: translateY(0px);
}
50% {
transform: translateY(-2px);
} }
100% { 100% {
margin-top: -5px; transform: translateY(-5px);
} }
} }
.item { .item {
@ -20,7 +24,7 @@
cursor: pointer; cursor: pointer;
&:hover { &:hover {
box-shadow: 0px 4px 16px 8px rgba(0, 0, 0, 0.04); box-shadow: 0px 4px 16px 8px rgba(0, 0, 0, 0.04);
animation: scaleMarginTop 0.5s; animation: scaleTransTop 0.3s;
} }
.top-content { .top-content {
width: 100%; width: 100%;