1.4 扩展(expand)


expand简码显示可展开/可折叠的文本部分

Thank you!

That’s some text with a footnote1

That’s some more text with a footnote.2


  1. And that’s the footnote. ↩︎

  2. Anything of interest goes here.

    Blue light glows blue. ↩︎

注释

这只能在现代浏览器中完美运行。虽然 Internet Explorer 11 在显示它时存在问题,但该功能仍然有效。

用法

{{% expand title="Expand me..." %}}Thank you!{{% /expand %}}
{{% expand "Expand me..." %}}Thank you!{{% /expand %}}

参数

NamePositionDefaultNotes
title1"Expand me..."Arbitrary text to appear next to the expand/collapse icon.
open2falseWhen 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 %}}

Yes, you did it!

最初扩展

{{% expand title="Expand me..." open="true" %}}No need to press you!{{% /expand %}}

No need to press you!

任意文本

{{% 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 %}}

You can add standard markdown syntax:

  • multiple paragraphs
  • bullet point lists
  • emphasized, bold and even bold emphasized text
  • links
  • etc.
...and even source code

the possibilities are endless (almost - including other shortcodes may or may not work)