打开/关闭搜索
搜索
打开/关闭菜单
331
1.7K
131
11.8K
星露谷物语扩展百科
导航
首页
最近更改
随机页面
交流群
互通站
上传文件
打开/关闭外观设置菜单
通知
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
创建账号
登录
查看“︁模板:Clear/doc”︁的源代码
来自星露谷物语扩展百科
更多语言
查看
阅读
查看源代码
查看历史
associated-pages
模板
讨论
更多操作
←
模板: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: <code><nowiki><div style="clear:left/right/both;"></div></nowiki></code> (the value after <code>clear</code> depends on the parameters). This code affects elements with the CSS property <code>float</code>, including files floated to the side (for example, <code><nowiki>[[File:Image.png|right]]</nowiki></code>). ;Syntax * To clear both sides of the page, add the code {{t|Clear}}. * To clear only the left side of the page, add the code {{t|Clear|left}}. * To clear only the right side of the page, add the code {{t|Clear|right}}. You can also use {{t|-}} instead of {{t|Clear}} as a shorthand call for this template. __NOTOC__ ;Example <pre style="display:table"> === Section 1 === [[File:Example.jpg|200px|right]] Section 1 text. === Section 2 === Section 2 text. {{Clear|right}} === Section 3 === Section 3 text. </pre> This code produces the following result: ---- === Section 1 === [[File:Example.jpg|200px|right]] Section 1 text. === Section 2 === Section 2 text. {{Clear|right}} === 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|Clear}} 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|Clear}} template is to control which elements are displayed next to which other elements. == See also == * [https://developer.mozilla.org/en-US/docs/Web/CSS/clear CSS property <code>clear</code> on MDN] * [https://developer.mozilla.org/en-US/docs/Web/CSS/float CSS property <code>float</code> on MDN] <includeonly>[[Category:模板]]</includeonly><noinclude>[[Category:模板文件]]</noinclude>
该页面嵌入的页面:
模板:Documentation header
(
查看源代码
)
模块:Documentation
(
查看源代码
)
模块:Documentation/styles.css
(
查看源代码
)
模块:ProcessArgs
(
查看源代码
)
模块:STConversion
(
查看源代码
)
模块:Static
(
查看源代码
)
模块:TSLoader
(
查看源代码
)
返回
模板:Clear/doc
。
查看“︁模板:Clear/doc”︁的源代码
来自星露谷物语扩展百科