1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Add animation to ToC.

This commit is contained in:
Cotes Chung
2019-11-24 22:08:17 +08:00
parent 9e67a9dc22
commit 75b825cdde
3 changed files with 17 additions and 2 deletions

View File

@@ -404,6 +404,7 @@ footer .license a {
/*--- Panels ---*/
.access {
top: 2rem;
transition: top 0.2s ease-in-out;

View File

@@ -7,12 +7,26 @@
MIT License
*/
@keyframes fade-up {
from {
opacity: 0;
position: relative;
top: 2rem;
}
to {
opacity: 1;
position: relative;
top: 0;
}
}
#toc-wrap {
border-left: 1px solid rgba(158, 158, 158, 0.17);
position: -webkit-sticky;
position: sticky;
top: 2rem;
transition: top 0.2s ease-in-out;
animation: fade-up .8s;
}
#toc-wrap.topbar-down {