Template:Clear/doc查看源代码查看历史
本文档是Template:Clear的文档子页面(见模板页自身)。 本页包含用法信息、分类和其他非原模板页面的内容。 |
40px | 此模板在1,600,000个页面+中使用。 为了避免困扰和不必要的服务器负载,所有变更都应该经过测试。请先在模板的/sandbox或者/testcases子页面或在自己的zh-cn:用户页; zh-tw:使用者頁面; zh-hk:用戶頁;测试。测试过的内容可以一次更改。修改前請考虑至讨论页讨论变更。 |
40px | This template should not be substituted. The markup provided will be confusing to many editors, and as this template provides documentation for itself, there is little justification for substitution. |
This template adds <div style="clear:both;"></div>
, <div style="clear:left;"></div>
, or <div style="clear:right;"></div>
;
for technical HTML details, see Template talk:Clear.
{{clear}}
: Makes content wait until existing content is completed in all columns. Often used to stop text from flowing next to unrelated images.
Usage
{{clear}} {{clear|left}} {{clear|right}}
Example without {{clear}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
New section without template
See how this section starts at the right of the image?
Example that uses {{clear}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{clear}}
New section with template
See how this section appears below the image?
See also
- {{Clear left}}
- {{Clear right}}
- {{Clear2}}
- {{Float}}
- {{Stack}}