135 字
1 分钟
Markdown 防剧透文本

使用 :spoiler[隐藏内容] 避免直接展示答案或剧情。读者可以通过悬停、聚焦或点击查看,隐藏内容仍支持行内强调。

原版技术参考与完整示例(英文)

Spoilers conceal a short answer or plot detail without removing it from the document. Hover, focus, or activate the native control to reveal the content.

Inline details#

The answer is , and this sentence remains ordinary Markdown around it.

Spoilers can include inline code and .

Author syntax#

The answer is :spoiler[42].

The generated HTML uses a native button with an aria-expanded state. Without JavaScript, hover and focus still reveal the text; the optional runtime adds click and keyboard toggling.

Markdown 防剧透文本
https://sheeqi.com/posts/spoilers/
作者
Sheeqi
发布于
2026-08-28
许可协议
CC BY-NC-SA 4.0

分享文章

生成精美分享图或复制链接,与更多人分享本文。

继续阅读

沿着主题读

基于共同的标签与分类

换条路线

从其他文章中稳定抽取