RogerDodger (talk | contribs) No edit summary |
RogerDodger (talk | contribs) No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
< | <includeonly><span class="tooltip-label">{{#invoke:String|trim| {{{1}}} }}</span><!-- | ||
--><span class="tooltip-body" style="display: none">{{#invoke:String|trim|{{{2}}}}}<!-- | |||
-->{{#if: {{{3|}}} |<span class="tooltip-hr"></span>{{#invoke:String|trim|{{{3}}}}} }}<!-- | |||
-->{{#if: {{{4|}}} |<span class="tooltip-hr"></span>{{#invoke:String|trim|{{{4}}}}} }}<!-- | |||
--></span></includeonly><noinclude>{{documentation}}</noinclude> |
Latest revision as of 08:12, 3 March 2024
This template creates a tooltip, i.e. a label that displays more information when it's hovered.
Usage
{{tt
|Tooltip
|This is a tooltip box.
|It's used to provide a definition for [[jargon]] without forcing the player to look at another page.
}}
Parameters
Parameters can't contain block elements or it'll break the layout. This is a tradeoff to allow the tooltip label to be inline.
Parameter | Description |
---|---|
1
|
Label for the tooltip. |
2
|
First line in the tooltip body. |
3
|
Optional second line in the tooltip body. |
4
|
Optional third line in the tooltip body. |
Example
What is a Tooltip ? Wow, that's cool . We can have up to three lines in the body.
- The above documentation is from Template:Tt/doc
- Editors should experiment in this template’s sandbox and testcases pages