在块之间添加空白空间并自定义其高度。

  • 名称: core/spacer
  • 类别: 设计
  • API 版本: 3
  • 块类型: 静态(保存在帖子内容中)

属性

通过 attributes 属性在 block.json 中定义。

属性类型默认值描述
heightstring"100px"—
widthstring——

支持

通过 supports 属性在 block.json 中定义。

上下文

通过 usesContext 和 providesContext 属性在 block.json 中定义。

使用的上下文:

  • orientation

块标记

这是一个 静态块。标记直接保存在帖子内容中。

<!-- wp:spacer {"height":"100px"} -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

来源