9.5. 标签选项卡#
选项卡组织并允许在相同层次结构的相关内容组之间进行导航。每个选项卡应该包含与集合中其他选项卡不同的内容。
Content 1
Content 2
Syntax
9.5.1. 同步选项卡#
使用 sync
选项来跨多个选项卡集同步选中的选项卡项。注意,同步需要启用JavaScript。
Content 1
Content 2
Content 1
Content 2
Syntax
9.5.2. 选项卡式的代码示例#
The tab-set-code
directive provides a shorthand for synced code examples.
You can place any directives in a tab-set-code
that produce a literal_block
node with a language
attribute, for example code
, code-block
and literalinclude
.
Tabs will be labelled and synchronised by the language
attribute (in upper-case).
tab-set-code
指令为同步代码示例提供了一种简写方式。你可以在 tab-set-code
中放置任何指令,从而产生带有language
属性的literal_block
节点,例如 code
, code-block
和literalinclude
。标签将被标记并通过language
属性(大写)进行同步。
a = 1;
9.5.3. 其他组件中的选项卡#
Tabs can be nested inside other components, such as inside dropdowns or within grid items.
Tabs in dropdown
Paragraph
Content 1
Content 2
Initial paragraph
Content 1
Content 2
Content 1
Content 2
Ending paragraph