Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于目录栏的滚动问题 #745

Closed
Deecyn opened this issue May 24, 2020 · 1 comment
Closed

关于目录栏的滚动问题 #745

Deecyn opened this issue May 24, 2020 · 1 comment
Labels
feature:extension Feature request that affects widgets, comment, share, search, and plugins.
Milestone

Comments

@Deecyn
Copy link

Deecyn commented May 24, 2020

你好,在我的 icarus 主题 3.0.1 版本下:

当文章比较长的时候,如果设置整个边栏都可以滚动的话,当阅读到文章中后部的时候,目录栏已经滚动到上面去了,看不见了;如果设置边栏固定的话,在阅读文章前面的时候,又无法预览整个目录。

所以想问一下,能否实现像 掘金 或者 NexT 主题 这样的,目录栏可以单独滚动、阅读文章的当前位置能在目录中定位的效果吗?

参考了 #673#730 中的做法,效果不是很好。

@ppoffice ppoffice added the feature:extension Feature request that affects widgets, comment, share, search, and plugins. label May 24, 2020
@ppoffice ppoffice added this to the 4.0.0 milestone Aug 18, 2020
ppoffice referenced this issue in ppoffice/hexo-component-inferno Aug 18, 2020
@ppoffice
Copy link
Owner

ppoffice commented Aug 18, 2020

阅读文章的当前位置能在目录中定位
https://github.com/ppoffice/hexo-component-inferno/releases/tag/0.6.0
Demo: https://ppoffice.github.io/hexo-theme-icarus/Configuration/icarus%E7%94%A8%E6%88%B7%E6%8C%87%E5%8D%97-%E4%B8%BB%E9%A2%98%E9%85%8D%E7%BD%AE/

目录栏单独滚动
请在CSS/Stylus中设置#toc元素的max-heightoverflow-y: scroll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:extension Feature request that affects widgets, comment, share, search, and plugins.
Projects
None yet
Development

No branches or pull requests

2 participants