首页课程tab动画优化

This commit is contained in:
禺狨 2023-03-28 10:07:28 +08:00
parent 4bb82c6a8a
commit 4b8cac6ed9
2 changed files with 22 additions and 2 deletions

View File

@ -67,6 +67,8 @@
width: 64px;
height: 48px;
margin-right: 50px;
transition: all 0.2s;
position: relative;
cursor: pointer;
&:hover {
opacity: 0.8;
@ -86,8 +88,10 @@
.tab-active-item {
width: 64px;
height: 48px;
margin-right: 50px;
cursor: pointer;
margin-right: 50px;
transition: all 0.2s;
&:hover {
opacity: 0.8;
}
@ -99,6 +103,22 @@
color: #ff4d4f;
line-height: 40px;
}
.banner {
animation: scaleTransX 0.3s;
}
}
}
@keyframes scaleTransX {
0% {
transform: translateX(0px);
}
50% {
transform: translateX(6px);
}
100% {
transform: translateX(0px);
}
}

View File

@ -213,6 +213,7 @@ const IndexPage = () => {
<div className={styles["tit"]}>{item.label}</div>
{item.key === tabKey && (
<Image
className={styles["banner"]}
width={40}
height={8}
preview={false}
@ -222,7 +223,6 @@ const IndexPage = () => {
)}
</div>
))}
{/* <Tabs defaultActiveKey="0" items={items} onChange={onChange} /> */}
</div>
{loading && (
<Row