แม่แบบ:กล่อง

จากวิกิพีเดีย สารานุกรมเสรี
Documentation icon คู่มือการใช้งานแม่แบบ[ดู] [แก้] [ประวัติ] [ล้างแคช]

Usage[แก้]

Recommended Usage: {{box|''Contents''}}
Special Parameters
Parameter Description Values
|type= The type of box
black
,
white
or
transparent
|span= Uses span tags instead of div tags yes
|wide= Set the box to be as wide as the page/table
yes
|inline= Set the box to be inline text text text
yes
text text text
|header= Adds an optional header
Header
Text
Supported Parameters
Parameter Description Default CSS
The contents of the box (Highly Recommend)
|background=/|color= The color of the background of the box White background-color
|align= The alignment of the box (left, center, right) (Recommended) left float
|padding= The inner padding of the border 3px padding
|style= The style of the border Solid border-style
|border color= The color of the border Black background-color
|border size= The size of the border 3px border-width
|text align= The alignment of the text (Recommended) left text-align
|spacing= The spacing of the letters letter-spacing
|font= The font of the box's text font-family
|font size= The font size of the box's text font-size
|text color= The color of the text black text-color
|margin= The outer margin of the box (Only does horizontal when type isn't inline-block or block) 3px margin
|box type= The type of box (inline, inline-block, block) inline-block display
|height= The height of the box height
|width= The width of the box (The width of the text) width
|CSS= Any Additional CSS you want to add

(make sure to add ; to end)

Other Parameters
Parameter Description Default CSS
|top margin= The top outer margin of the box (Only does horizontal when type isn't inline-block or block) 3px margin-top
|bottom margin= The bottom outer margin of the box (Only does horizontal when type isn't inline-block or block) 3px margin-bottom
|left margin= The left outer margin of the box (Only does horizontal when type isn't inline-block or block) 3px margin-left
|right margin= The right outer margin of the box (Only does horizontal when type isn't inline-block or block) 3px margin-right
|top padding= The top inner padding of the border 3px padding-top
|bottom padding= The bottom inner padding of the border 3px padding-bottom
|left padding= The left inner padding of the border 3px padding-left
|right padding= The right inner padding of the border 3px padding-right

Examples[แก้]

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
A
B
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

C
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
{{box|A|background=red|text color=white}}
{{box|B|background=blue|text color=orange}}
{{box|C|background=black|text color=white|margin=0px|height=1em|width=40px|border color=yellow}}

DOG
{{box|spacing=5px|height=50px|DOG}}

The quick brown fox jumps over the lazy dog
{{box|background=yellow|align=center|border size=10px|text align=center|The quick brown fox jumps over the lazy dog}}

Data[แก้]

This template produces a variety of boxes from preset options and from CSS.

พารามิเตอร์แม่แบบ[แก้ไขข้อมูลแม่แบบ]

แม่แบบนี้ต้องการการจัดรูปแบบพารามิเตอร์แบบอินไลน์

พารามิเตอร์คำอธิบายชนิดสถานะ
11

The contents of the box

ตัวอย่าง
Hello, world!
ไม่ทราบชนิดแนะนำ
headerheader

A heading for the box

ตัวอย่าง
Warning
ไม่ทราบชนิดแนะนำ
alignalign

The alignment of the box

ค่าปริยาย
left
ตัวอย่าง
center
ไม่ทราบชนิดแนะนำ
box typebox type

The type of box (css display) (block,inline-block or inline)

ตัวอย่าง
block
ค่าอัตโนมัติ
inline-block
ไม่ทราบชนิดเลือกได้
widewide

If set to yes the box will be wide

ค่าปริยาย
no
ตัวอย่าง
yes
ค่าอัตโนมัติ
ตรรกะเลือกได้
inlineinline

Set to yes for the box type to be inline

ค่าปริยาย
no
ตัวอย่าง
yes
ตรรกะเลือกได้
stylestyle

The style of the border

ค่าปริยาย
solid
ไม่ทราบชนิดเลือกได้
paddingpadding

The padding of the box

ค่าปริยาย
3px
ไม่ทราบชนิดเลือกได้
top paddingtop padding

The top padding of the box

ไม่ทราบชนิดเลือกได้
bottom paddingbottom padding

Thebottom padding of the box

ไม่ทราบชนิดเลือกได้
left paddingleft padding

The left padding of the box

ไม่ทราบชนิดเลือกได้
right paddingright padding

The right padding of the box

ไม่ทราบชนิดเลือกได้
border colorborder color

The color of the box border

ค่าปริยาย
black
ตัวอย่าง
red
สตริงเลือกได้
typetype

The type of box (black,white,transparent)

ตัวอย่าง
black
ไม่ทราบชนิดเลือกได้
border sizeborder size

The size of the border

ค่าปริยาย
3px
ไม่ทราบชนิดเลือกได้
colorcolor background

The color of background

ค่าปริยาย
white
ตัวอย่าง
black
ไม่ทราบชนิดเลือกได้
text colortext color

The color of the text

ค่าปริยาย
black
ตัวอย่าง
green
ไม่ทราบชนิดเลือกได้
text aligntext align

The alignment of the text (css text-align)

ค่าปริยาย
left
ตัวอย่าง
center
ไม่ทราบชนิดเลือกได้
spacingspacing

The spacing of the letters

ไม่ทราบชนิดเลือกได้
fontfont

The font of the text

ไม่ทราบชนิดเลือกได้
font sizefont size text size

The size of the text

ไม่ทราบชนิดเลือกได้
marginmargin

The size of the box's margin

ค่าปริยาย
3px
ตัวอย่าง
30px
ไม่ทราบชนิดเลือกได้
top margintop margin

The size of the box's top margin

ไม่ทราบชนิดเลือกได้
bottom marginbottom margin

The size of the box's bottom margin

ไม่ทราบชนิดเลือกได้
left marginleft margin

The size of the box's left margin

ไม่ทราบชนิดเลือกได้
right marginright margin

The size of the box's right margin

ไม่ทราบชนิดเลือกได้
heightheight

The height of the box

ค่าปริยาย
''the height of the contents plus the margin''
ตัวอย่าง
400px
ไม่ทราบชนิดเลือกได้
widthwidth

The width of the box

ค่าปริยาย
''the width of the text plus the margin''
ไม่ทราบชนิดเลือกได้
CSSCSS

Any additional CSS to use

ไม่ทราบชนิดเลือกได้

Tracking categories[แก้]

See also[แก้]