模板: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?
TemplateData
TemplateData for Clear
Makes content wait until existing content is completed in all columns. Often used to stop text from flowing next to unrelated images, so text will appear on a full width line under the image.
參數 | 描述 | 類型 | 狀態 | |
---|---|---|---|---|
side | 1 | can be 'right' or 'left' so content is delayed until just the right or left column is complete. The default clears both columns.
| 字串 | 選填 |
See also
- {{Clear left}}
- {{Clear right}}
- {{Clear2}}
- {{Float}}
- {{Stack}}
The above documentation is transcluded from Template:Clear/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |