按特定顺序显示的项目的有序集合。
块关系
允许的内部块:
– core/list-item
属性
通过 block.json 中的 attributes 属性定义。
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
ordered | boolean | false | 角色: content |
values | string | "" | 来源: html. 选择器: ol,ul. 角色: content |
type | string | — | — |
start | number | — | — |
reversed | boolean | — | — |
placeholder | string | — | — |
支持
通过 block.json 中的 supports 属性定义。
anchor:truealign:"wide","full"html:falsetypography:fontSize:truelineHeight:true
background:backgroundImage:truebackgroundSize:truegradients:true
color:spacing:margin:truepadding:true
shadow:trueinteractivity:clientNavigation:true
listView:true
CSS 选择器
通过 block.json 中的 selectors 属性定义。
- 边框:
.wp-block-list:not(.wp-block-list .wp-block-list) - 阴影:
.wp-block-list:not(.wp-block-list .wp-block-list)
块标记
这是一个 混合块。它保存静态标记,服务器在渲染期间可能会对其进行增强。
<!-- wp:list {"ordered":false,"values":""} -->
<!-- Content... -->
<!-- /wp:list -->
来源
- block.json (参考)
- 源目录 — 浏览
edit和save源文件,index.php等。