1.4 扩展(expand)
expand
简码显示可展开/可折叠的文本部分
注释
这只能在现代浏览器中完美运行。虽然 Internet Explorer 11 在显示它时存在问题,但该功能仍然有效。
用法
{{% expand title="Expand me..." %}}Thank you!{{% /expand %}}
{{% expand "Expand me..." %}}Thank you!{{% /expand %}}
参数
Name | Position | Default | Notes |
---|---|---|---|
title | 1 | "Expand me..." | Arbitrary text to appear next to the expand/collapse icon. |
open | 2 | false | When true the content text will be initially shown as expanded. |
<content> | <empty> | Arbitrary text to be displayed on expand. |
案例
默认
{{% expand %}}Yes, you did it!{{% /expand %}}
最初扩展
{{% expand title="Expand me..." open="true" %}}No need to press you!{{% /expand %}}
任意文本
{{% expand title="Show me almost **endless** possibilities" %}}
You can add standard markdown syntax:
- multiple paragraphs
- bullet point lists
- _emphasized_, **bold** and even **_bold emphasized_** text
- [links](https://example.com)
- etc.
```plaintext
...and even source code
```
> the possibilities are endless (almost - including other shortcodes may or may not work)
{{% /expand %}}