> 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).

# 可展开

可展开块有助于压缩原本可能很长的一段文字。它们在分步指南和常见问题解答中也非常实用。

默认情况下，发布后的文档站点上，可展开块会处于折叠状态。如果你想让可展开块默认展开，请打开该块的 **选项菜单** <picture><source srcset="/files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="/files/e1df373962dc4830bcb786d7e5cb3cce603367d3" alt=""></picture> 并选择 **默认展开**.

### 示例

<details open>

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

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

你也可以选择将展开后的块设置为 **默认展开** 在该块的 **选项菜单** <picture><source srcset="/files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="/files/e1df373962dc4830bcb786d7e5cb3cce603367d3" 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.
