欢迎来到骷髅女孩WIKI,一个服务于小众、致力于中文本地化的WIKI。目前团队人手不足,如果你对搬运、翻译或编写中文资料感兴趣的话,请到QQ群127859346咨询。查看角色出招表请使用电脑浏览器。

全站通知:

模板:-

来自骷髅女孩WIKI_BWIKI_哔哩哔哩
(重定向自模板:Clear
跳到导航 跳到搜索

模板:[刷新此页面] [编辑] [页面历史]
文档:[查看] [编辑] [页面历史]

说明文档

This template allows you to clear the left side, right side, or both sides of the page. Clearing means that the content following the template will not be displayed until the existing content on the specified sides (for example, "hanging" or floating images or blocks) is displayed completely. This template is often used so that the text does not flow around unrelated images.

The template adds the following code to the page: <div style="clear:left/right/both;"></div> (the value after clear depends on the parameters). This code affects elements with the CSS property float, including files floated to the side (for example, [[File:Image.png|right]]).

Usage

  • To clear both sides of the page, add the code {{Clear}}.
  • To clear only the left side of the page, add the code {{Clear|left}}.
  • To clear only the right side of the page, add the code {{Clear|right}}.

You can also use {{-}} instead of {{Clear}} as a shorthand call for this template.

Example


=== Section 1 ===
[[File:SG2E+_logo.png|500px|right]]
Section 1 text.

=== Section 2 ===
Section 2 text.
{{Clear|right}}

=== Section 3 ===
Section 3 text.

This code produces the following result:


Section 1

SG2E+ logo.png

Section 1 text.

Section 2

Section 2 text.

Section 3

Section 3 text.


As you can see above, the image of the Skullgirls logo added in section 1 is displayed to the right and extends down through section 2, while the {{Clear}} template is called at the end of the second section, resulting in the logo image not being next to section 3. Thus, one use of the {{Clear}} template is to control which elements are displayed next to which other elements.

See also


所有模板列表