博客内容

带悬浮目录的文章

Article with sticky contents

阅读进度条 + 实时目录

实时预览

提示词正文

Build an article page with Tailwind CSS: a thin reading-progress bar fixed to the top of the viewport that fills as you scroll, a sticky table-of-contents rail on the left listing the h2/h3 headings with the current section highlighted, and the article body on the right. Clicking a TOC entry smooth-scrolls with scroll-margin so headings are not hidden under the header, and the progress bar is a plain div width bound to scroll position (no library).

提示词保持英文原文——直接粘贴进 Claude、Cursor、v0 或任何 AI 编程工具即可使用。

怎么用

顶部进度条随滚动填充;左侧目录高亮当前章节;点击平滑滚动并留出 scroll-margin。

同类提示词 · 博客内容

© 2026 Genisource Vibe · 提示词详情