> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/zh/chuang-jian-nei-rong/blocks/expandable.md).

# 可展开

向页面添加可展开块，以缩短页面、隐藏较长内容，或创建 FAQ

可展开块有助于将原本可能很长的段落压缩成更简洁的内容。它们也非常适合分步指南和常见问题解答。

默认情况下，可展开块在你发布的文档站点中会处于折叠状态。如果你希望某个可展开块默认展开，请打开该块的 **选项菜单** <picture><source srcset="/files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FaS1QvPIBVYwhpFTGcPBN%2Foptions-menu.svg?alt=media&amp;token=3ee40bbf-f4fb-41fa-aa30-306b559cbe88" alt=""></picture> 并选择 **默认展开**.

### 示例

<details open>

<summary>第 1 步：开始使用可展开块</summary>

要添加可展开块，请按 `/` 在一个空块上，或点击 `+` 编辑器左侧的 **可展开**.

你也可以将展开的块设置为 **默认展开** 在该块的 **选项菜单** <picture><source srcset="/files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FaS1QvPIBVYwhpFTGcPBN%2Foptions-menu.svg?alt=media&amp;token=3ee40bbf-f4fb-41fa-aa30-306b559cbe88" alt=""></picture> ——就像这个块一样。

</details>

<details>

<summary>第 2 步：向你的块中添加内容</summary>

一旦插入了可展开块，你就可以向其中添加内容——包括列表和代码块。

</details>

## Markdown 中的表示方式

{% code overflow="wrap" %}

```markdown
# 可展开块

<details open>

<summary>在此添加你的可展开标题</summary>

在此添加你的可展开正文文本。这个可展开块默认处于展开状态。

</details>

<details>

<summary>在此添加你的可展开标题</summary>

在此添加你的可展开正文文本。这个可展开块默认处于折叠状态。

</details>
```

{% endcode %}

### 限制

对于你可以在可展开块中创建的块类型，有一些限制。你可以将以下类型的内容插入可展开块：

* 段落
* 标题（1、2 和 3）
* 无序列表、有序列表和任务列表
* 行内图片

要随时查看完整列表，请在可展开块中另起一行并按 `/` 以调出插入面板。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/documentation/zh/chuang-jian-nei-rong/blocks/expandable.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
