模板:ToggleBox

出自Terraria Wiki
跳至導覽 跳至搜尋
Template-info.svg 文檔 以下文檔來自Template:ToggleBox/doc。(編輯 | 歷史

ToggleBox works somehow like collapsible box, it can be toggled between two CSS classes (.toggled and .not-toggled) by clicking on "handle" element(s).

By default, all sub elements with .only-toggled class will be hidden when not toggled, and .only-not-toggled will be hidden when toggled.

You can customize the behavior via css/js, see Achievements for example.

Style A: (recommended)

{{toggleBox/start}}
{{toggleBox/handle|default=<text shown when not toggled>|toggled=<text shown when toggled>}}
... <contents> ...
{{toggleBox/end}}

Style A: (not recommended)

{{toggleBox|default=<text shown when not toggled>|toggled=<text shown when toggled>
| ... <contents>(as unamed parameter 1) ...
}}