# 可展开

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

默认情况下，可展开块在你发布的文档站点中会处于折叠状态。如果你希望某个可展开块默认展开，请打开该块的 **选项菜单** <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 %}

### 限制

对于你可以在可展开块中创建的块类型有一些限制。你可以通过在可展开块中开始新的一行并按下来查看完整列表 `/` 以调出插入面板。


---

# Agent Instructions: 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:

```
GET https://gitbook.com/docs/documentation/zh/creating-content/blocks/expandable.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
