Template:Tabs/core:修订间差异
跳到导航
跳到搜索
imported>梦蝶葬花 (创建页面,内容为“<includeonly><div class="Tabs {{{theme|}}}" {{#if:{{{DefaultTab|}}}|data-default-tab="{{{DefaultTab|}}}"|}} {{#if:{{{LabelPadding|}}}|data-label-padding="{{{LabelPad...”) |
imported>=海豚= 无编辑摘要 |
||
第1行: | 第1行: | ||
<includeonly><div class="Tabs {{{theme|}}}" {{#if:{{{DefaultTab|}}}|data-default-tab="{{{DefaultTab|}}}"|}} {{#if:{{{LabelPadding|}}}|data-label-padding="{{{LabelPadding|}}}"|}} {{#if:{{{LabelBorderColor|}}}|data-label-border-color="{{{LabelBorderColor|}}}"|}} {{#if:{{{LabelColor|}}}|data-label-color="{{{LabelColor|}}}"|}} {{#if:{{{TextBorderColor|}}}|data-text-border-color="{{{TextBorderColor|}}}"|}} {{#if:{{{TextPadding|}}}|data-text-padding="{{{TextPadding|}}}"|}} {{#if:{{{LabelBackgroundColor|}}}|data-label-background-color="{{{LabelBackgroundColor|}}}"|}} {{#if:{{{TextBackgroundColor|}}}|data-text-background-color="{{{TextBackgroundColor|}}}"|}} {{#ifeq:{{{AutoWidth|}}}|yes|data-auto-width="yes"}}>{{#forargs:label | <includeonly><div class="Tabs {{{theme|}}}" data-label-side="{{#switch:{{{LabelSide|}}}|left|right|bottom|top={{{LabelSide|}}}|top}}" data-label-color-side-reverse="{{{LabelColorSideReverse|}}}" data-divider-size="{{{DividerSize|}}}" {{#if:{{{style|}}}|style="{{{style|}}}"}} {{#if:{{{DefaultTab|}}}|data-default-tab="{{{DefaultTab|}}}"|}} {{#if:{{{LabelPadding|}}}|data-label-padding="{{{LabelPadding|}}}"|}} {{#if:{{{LabelBorderColor|}}}|data-label-border-color="{{{LabelBorderColor|}}}"|}} {{#if:{{{LabelColor|}}}|data-label-color="{{{LabelColor|}}}"|}} {{#if:{{{TextBorderColor|}}}|data-text-border-color="{{{TextBorderColor|}}}"|}} {{#if:{{{TextPadding|}}}|data-text-padding="{{{TextPadding|}}}"|}} {{#if:{{{LabelBackgroundColor|}}}|data-label-background-color="{{{LabelBackgroundColor|}}}"|}} {{#if:{{{TextBackgroundColor|}}}|data-text-background-color="{{{TextBackgroundColor|}}}"|}} {{#ifeq:{{{AutoWidth|}}}|yes|data-auto-width="yes"}} {{#switch:{{#if:{{{Float|}}}|{{{Float|}}}|{{{float|}}}}}|left|right=data-float="{{#if:{{{Float|}}}|{{{Float|}}}|{{{float|}}}}}"}}>{{#forargs:label | ||
| key | | key | ||
| val | | val |
2020年8月3日 (一) 22:19的最新版本
参数列表[编辑源代码]
- Theme:内置主题样式:
- green(绿色),
- red(红色),
- blue(蓝色),
- yellow(黄色),
- purple(紫色),
- orange(橙色),
- black(黑色);
- DefaultTab:指定页面加载时显示第几个tab,默认值为
1
; - LabelPadding:指定label的内边距,默认值为
2px
; - LabelBorderColor:指定选中的label的左右边框颜色,默认值为
#aaa
; - LabelBackgroundColor:指定选中的label的背景色,默认值为
white
; - LabelColor:指定选中的label的上边框颜色,默认值为
green
; - TextBorderColor:指定显示的text的边框颜色,默认值为
#aaa
; - TextBackgroundColor:指定显示的text的背景色,默认值为
white
; - TextPadding:指定显示的text的内边距,默认值为
20px 30px
; - AutoWidth:使tabs不再占满整行,如要启用必须传入【yes】值,默认值为
no
。
一个例子[编辑源代码]
{{tabs/core |label1=Label 1 |text1=Text 1 |label2=Label 2 |text2=[[File:江泽民视察二院.jpg]] |label3=Label 3 |text3={{膜蛤}} |DefaultTab=2 |LabelPadding=1em |LabelBorderColor=black |LabelColor=blue |TextPadding=1.5em |TextBorderColor=black |AutoWidth=yes }}