Spacer
Add white space between blocks and customize its height.
Attributes
Defined via the attributes property in block.json.
| Attribute | Type | Default | Description |
|---|---|---|---|
height |
string |
"100px" |
— |
width |
string |
— | — |
Supports
Defined via the supports property in block.json.
anchor:truespacing:margin:["top","bottom"]
interactivity:clientNavigation:true
Context
Defined via the usesContext and providesContext properties in block.json.
Uses context:
orientation
Block Markup
This is a static block. The markup is saved directly in the post content.
<!-- wp:spacer {"height":"100px"} -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
Source
- block.json (reference)
- Source directory — browse the
editandsavesource files,index.php, and more.
这篇文档对你有帮助吗?
谢谢你的反馈!