切換選單
331
1.7K
131
11.8K
星露谷物语扩展百科
切換偏好設定選單
切換個人選單
尚未登入
若您做出任何編輯,會公開您的 IP 位址。

模板:Clear/doc

出自星露谷物語擴展百科
於 2024年12月14日 (六) 02:11 由 Sizau留言 | 貢獻 所作的修訂 (3546754953775813移动页面模板:Clear/SVE/doc模板:Clear/doc,不留重定向)

Description

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]]).

Syntax
  • To clear both sides of the page, add the code 模板:T.
  • To clear only the left side of the page, add the code 模板:T.
  • To clear only the right side of the page, add the code 模板:T.

You can also use 模板:T instead of 模板:T as a shorthand call for this template.

Example

=== Section 1 ===
[[File:Example.jpg|200px|right]]
Section 1 text.

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

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

This code produces the following result:


Section 1

Section 1 text.

Section 2

Section 2 text. 模板:Clear/SVE

Section 3

Section 3 text.


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

See also