Template:Font/doc
This template is used on approximately 1,400 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
About
[edit]{{font}} This template is used to define text styles, for example, size and color. It can also be used to inject CSS. This is very useful when it is needed to change "I" to " I", since uppercase "I" looks the same as lowercase "L".
How to
[edit]{{font|TEXT(or「text=TEXT」)|font=FONT|size=SIZE(px/em/pt/%)|color=COLOR|bgcolor=BACKGROUND COLOR|css=CSS}}
Example
[edit]If enter {{font|text=Some text.|font=Comic Sans MS|size=20px|color=#7f5620}}
It will show as:
Some text.
If enter {{font|Illinois|font=Times|size=20px}}
It will show as:
Illinois, which is way better than
Illinois.
Enter | Will show as |
---|---|
{{font|啡色的文字。|font=標楷體|size=20px|color=#7f5620}}
|
啡色的文字。 |
{{font|text=Hello World!|font=Century Gothic|size=35px|color=#bf00bf}}
|
Hello World! |
{{font|text=囧囧囧囧囧|font=Simhei|color=#c9b295|bgcolor=#364d6a}}
|
囧囧囧囧囧 |
{{font|text=可以選用全部選項。|font=Simhei|size=20px|color=#5a7aad|bgcolor=#f9f9ef}}
|
可以選用全部選項, |
{{font|text=也可以只選用其中一項選項。|size=25px}}
|
也可以只選用其中一項選項。 |
Attention
[edit]- By default:
Parameter | Default |
---|---|
font
|
Sans-serif |
size
|
100% |
color
|
black |
bgcolor
|
transparent |
See also
[edit]- {{font color}}
Template | Size | Semantics | Sample |
---|---|---|---|
{{small}} | 85% | <small> |
HHHHH |
{{smaller}} | 90% |
style="background:#ececec;vertical-align:middle;text-align:center;" |none || HHHHH | |
{{resize}} | 90% |
style="background:#ececec;vertical-align:middle;text-align:center;" |none || HHHHH | |
{{midsize}} | 92% |
style="background:#ececec;vertical-align:middle;text-align:center;" |none || HHHHH | |
style="background:#ececec;vertical-align:middle;text-align:center;" |none || 100% || style="background:#ececec;vertical-align:middle;text-align:center;" |none || HHHHH | |||
{{larger}} | 110% |
style="background:#ececec;vertical-align:middle;text-align:center;" |none || HHHHH | |
{{big}} | 120% |
style="background:#ececec;vertical-align:middle;text-align:center;" |none || HHHHH | |
{{large}} | large |
style="background:#ececec;vertical-align:middle;text-align:center;" |none || HHHHH | |
{{huge}} | 180% |
style="background:#ececec;vertical-align:middle;text-align:center;" |none || HHHHH | |
{{resize|x%}} | custom |
style="background:#ececec;vertical-align:middle;text-align:center;" |none || | |
{{font|size=x%}} | custom |
style="background:#ececec;vertical-align:middle;text-align:center;" |none || |