模板: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}}