Template:Tabs/core:修订间差异

H萌娘,万物皆可H的百科全书!
跳到导航 跳到搜索
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的最新版本

Template-info.svg 模板文档  [查看] [编辑] [历史] [刷新]

参数列表[编辑源代码]

  1. Theme:内置主题样式:
    • green(绿色),
    • red(红色),
    • blue(蓝色),
    • yellow(黄色),
    • purple(紫色),
    • orange(橙色),
    • black(黑色);
  2. DefaultTab:指定页面加载时显示第几个tab,默认值为1
  3. LabelPadding:指定label的内边距,默认值为2px
  4. LabelBorderColor:指定选中的label的左右边框颜色,默认值为#aaa
  5. LabelBackgroundColor:指定选中的label的背景色,默认值为white
  6. LabelColor:指定选中的label的上边框颜色,默认值为green
  7. TextBorderColor:指定显示的text的边框颜色,默认值为#aaa
  8. TextBackgroundColor:指定显示的text的背景色,默认值为white
  9. TextPadding:指定显示的text的内边距,默认值为20px 30px
  10. 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
}}
Label 1

Text 1

Label 2

江泽民视察二院.jpg

Label 3