feat(toc): add sticky positioning and entry animation for improved UX
这个提交包含在:
@@ -10,6 +10,10 @@
|
||||
--dash-spacing: 10px;
|
||||
--dash-width: 2px;
|
||||
|
||||
// 进入动画初始状态(仅 sticky 激活时播放)
|
||||
opacity: 1;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
|
||||
// 虚线背景层 - 带遮罩
|
||||
&::before {
|
||||
content: '';
|
||||
@@ -81,6 +85,10 @@
|
||||
opacity: 0.8;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
|
||||
/* 进入动画:透明度由0到1,宽度由中间到100% */
|
||||
animation: sticky-in 0.5s ease-in-out forwards;
|
||||
opacity: 1;
|
||||
|
||||
&::before {
|
||||
animation: line-flow 1.5s linear infinite;
|
||||
mask-image: none;
|
||||
@@ -126,4 +134,13 @@
|
||||
left: 80%;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes sticky-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
在新议题中引用
屏蔽一个用户