在布局容器中收集区块。
属性
通过 block.json 中的 attributes 属性定义。
支持功能
通过 block.json 中的 supports 属性定义。
align:"wide","full"anchor:trueariaLabel:truehtml:falsebackground:backgroundImage:truebackgroundSize:truegradient:true
color:shadow:truespacing:margin:["top","bottom"]padding:trueblockGap:["horizontal","vertical"]
dimensions:minHeight:trueminWidth:true
position:sticky:true
typography:fontSize:truelineHeight:truetextColumns:true
layout:allowSizingOnChildren:true
interactivity:clientNavigation:true
allowedBlocks:true
区块标记
这是一个 静态区块。标记直接保存在文章内容中。
<!-- wp:group {"align":"full","backgroundColor":"secondary","layout":{"type":"default"}} -->
<div class="wp-block-group alignfull has-secondary-background-color has-background">
<!-- wp:paragraph -->
<p>这是一个组区块。</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>组区块内容。</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
来源
- block.json (参考)
- 源代码目录 — 浏览
edit和save源文件、index.php等。