/

本页目录

可折叠

.collapse 函数创建一个可交互的折叠块,用户可以通过点击来展开或收起。

该函数需要一个行内内容(在展开时显示)。

示例 1

.collapse {一个_可折叠_块。**点击我!**}
    You found this hidden content.

    **Surprise!**
一个_可折叠_块。点击我!

You found this hidden content.

Surprise!

你可以使用可选的 open Boolean 参数来改变块的初始状态,该参数默认为 false(折叠)。

示例 2

.collapse {一个_可折叠_块。**点击我!**} open:{yes}
    Not so hidden content anymore!
一个_可折叠_块。点击我!

Not so hidden content anymore!