模板:Tabs/doc

< Template:Tabs这是此页面的最新修订,它没有已核准修订。

Use this template to create up to 9 tabs.

Warning! Tabs don't show well on print and editing their content with the visual editor becomes harder.

Examples

Single-page content

The following wikitext:

{{Tabs
| tab1 = Foo
| tab2 = Bar
| tab3 = Baz
| content1 = Hello world!
| content2 = Lorem ipsum!
| content3 = Yolo!
}}

will output:

Foo
Bar
Baz

Hello world!

Lorem ipsum!

Yolo!

Notice that the first tab is activated by default.

Multi-page content

You can also use this template to create tabs that link different pages together, like so:

{{Tabs
| [[Template:Menu|Menus]]
| [[Template:Tabs|Tabs]]
| [[Template:Navbox|Navboxes]]
}}

will output:

Notice that the tab of the current page is activated by default.

See also

Template data

Use this template to create up to 9 tabs.

模板参数

此模板首选参数换行的代码块格式。

参数描述类型状态
Tab 1tab11

Text or link of the first tab

示例值
Foo
字符串推荐
Content 1content1

Content of the first tab

内容可选
Tab 2tab22

Text or link of the second tab

示例值
Bar
字符串推荐
Content 2content2

Content of the second tab

内容可选
Tab 3tab33

Text or link of the third tab

示例值
Baz
字符串可选
Content 3content3

Content of the third tab

内容可选