模板:Midsize/doc

来自决策链云智库
< 模板:Midsize
Zeroclanzhang讨论 | 贡献2024年1月21日 (日) 22:26的版本 (创建页面,内容为“{{Documentation subpage}} {{High-use}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> {{tl|Midsize}} displays parameter {{para|1}} as mid-size text, at font-size 92%, slightly larger than Template:Small, which shows text at 85% size. The optional parameter "height=1.1" can wrap multiple lines closer together. Parameter "size=70" can set other sizes, such as "<span style="f…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

{{Midsize}} displays parameter |1= as mid-size text, at font-size 92%, slightly larger than Template:Small, which shows text at 85% size. The optional parameter "height=1.1" can wrap multiple lines closer together. Parameter "size=70" can set other sizes, such as "This is size-70 text".

Usage:   {{midsize|This is middle-sized text.}} → This is middle-sized text.

The line-height is also reduced so that the text wraps as less-tall lines, as in the following example of text with breaks in the lines:

  • {{midsize|This example shows multiple lines of<br>middle-sized text as being wrapped<br>
    onto multiple lines, closer together.}} →
    This example shows multiple lines of
    middle-sized text as being wrapped
    onto multiple lines, closer together.
  • {{midsize|height=0.9|This 2nd example shows multiple lines of<br>middle-sized text being wrapped<br>
    onto multiple lines, even closer together.}} →
    This 2nd example shows multiple lines of
    middle-sized text being wrapped
    onto multiple lines, even closer together.

Because many users are unaware of the style directives for changing both the font-size and the line-height attributes, then Template:Midsize provides an easy way to consistently reduce text as being middle-sized, but larger than small-font text, while also allowing "height=1.1" or "size=n" for other sizes.

See also

Font size templates
Code for inline content Code for block content Size Result
{{small|<text>}}
{{smaller|<text>}}
{{smalldiv|<text>}} 85% text
{{resize|<text>}} {{resizediv|<text>}} 90% text
{{midsize|<text>}} 92% text
none none 100% text
{{large|<text>}}
{{larger|<text>}}
{{big|<text>}}
{{largediv|<text>}} 120% text
{{huge|<text>}} 180% text
{{resize|<x%>|<text>}} {{resizediv|<x%>|<text>}} custom varies
{{font|<size=x%>}} custom varies

For block content (including multiple lines of text), use {{midsizediv}}.