mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-07-22 00:11:11 +08:00
首页课程tab动画优化
This commit is contained in:
parent
4bb82c6a8a
commit
4b8cac6ed9
@ -67,6 +67,8 @@
|
|||||||
width: 64px;
|
width: 64px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
margin-right: 50px;
|
margin-right: 50px;
|
||||||
|
transition: all 0.2s;
|
||||||
|
position: relative;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
&:hover {
|
&:hover {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
@ -86,8 +88,10 @@
|
|||||||
.tab-active-item {
|
.tab-active-item {
|
||||||
width: 64px;
|
width: 64px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
margin-right: 50px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
margin-right: 50px;
|
||||||
|
transition: all 0.2s;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
@ -99,6 +103,22 @@
|
|||||||
color: #ff4d4f;
|
color: #ff4d4f;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
|
.banner {
|
||||||
|
animation: scaleTransX 0.3s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes scaleTransX {
|
||||||
|
0% {
|
||||||
|
transform: translateX(0px);
|
||||||
|
}
|
||||||
|
|
||||||
|
50% {
|
||||||
|
transform: translateX(6px);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
transform: translateX(0px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,6 +213,7 @@ const IndexPage = () => {
|
|||||||
<div className={styles["tit"]}>{item.label}</div>
|
<div className={styles["tit"]}>{item.label}</div>
|
||||||
{item.key === tabKey && (
|
{item.key === tabKey && (
|
||||||
<Image
|
<Image
|
||||||
|
className={styles["banner"]}
|
||||||
width={40}
|
width={40}
|
||||||
height={8}
|
height={8}
|
||||||
preview={false}
|
preview={false}
|
||||||
@ -222,7 +223,6 @@ const IndexPage = () => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
{/* <Tabs defaultActiveKey="0" items={items} onChange={onChange} /> */}
|
|
||||||
</div>
|
</div>
|
||||||
{loading && (
|
{loading && (
|
||||||
<Row
|
<Row
|
||||||
|
Loading…
x
Reference in New Issue
Block a user