查看“模板:PBR/doc”的源代码
←
模板:PBR/doc
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{RightToc}} ==WTF?== Template:PBR is intended to give the outward appearance and effect of the BR tag with the exception that multiple uses of it will not cause multiple lines of whitespace. You use it everywhere you want a linebreak but don't want to have extra whitespace associated with linebreaks piling up. Essentially PBR is a conditional BR, if a BR is needed it works as a BR, if it's not needed it has no effect. It's the bees knees. ===How it works=== The original version used an empty "div" tag but it had the side effect that you would have to fight the wiki engine to keep it from inserting "p" tags. The solution is to *not* fight the wiki engine and use a tag that it will let you include in "p" tags. The new version uses an empty "span" tag, which is "p" friendly but with inline style we convert the tag to "block" from "inline". ===Problems=== Because of the unorthodox (ab)use of this mix of CSS, HTML and MediaWiki we end up with a situation where strange things happen that few web browser authors have given much thought to. Specifically when copying the text the result is different depending upon which web browser you use. The only browser to support this flawlessly at present are those based on Webkit (Google Chrome, Safari). Both IE 8.0 and Firefox 3.0 are buggy. ===Name=== Q: Why PBR?<br/> A: Pseudo-BReak ==Breaking Lines== {| border="1" cellspacing="0" |-valign="top" | ===BR Tag=== <hr> <div> test<br> test<br> test<br>test<br> test<br> test<br>test<br> test<br> <br> <br> <br> test<br> </div> <hr> | ===SPAN {{HoverText|D:B|display:block}}=== <hr> <div> test<span style="display:block;"></span> test<span style="display:block;"></span> test<br>test<span style="display:block;"></span> test<span style="display:block;"></span> test<span style="display:block;"></span>test<span style="display:block;"></span> test<span style="display:block;"></span> <span style="display:block;"></span> <span style="display:block;"></span> <span style="display:block;"></span> test<span style="display:block;"></span> </div> <hr> | ==={{HoverText|SPAN|display:block;}} + {{HoverText|BR|display:none;}}=== <hr> <div> test<span style="display:block;"></span><br style="display:none;"> test<span style="display:block;"></span><br style="display:none;"> test<br>test<span style="display:block;"></span><br style="display:none;"> test<span style="display:block;"></span><br style="display:none;"> test<span style="display:block;"></span><br style="display:none;">test<span style="display:block;"></span><br style="display:none;"> test<span style="display:block;"></span><br style="display:none;"> <span style="display:block;"></span><br style="display:none;"> <span style="display:block;"></span><br style="display:none;"> <span style="display:block;"></span><br style="display:none;"> test<span style="display:block;"></span><br style="display:none;"> </div> <hr> | ===PBR Template=== <hr> <div> test{{PBR}} test{{PBR}} test<br>test{{PBR}} test{{PBR}} test{{PBR}}test{{PBR}} test{{PBR}} {{PBR}} {{PBR}} {{PBR}} test{{PBR}} </div> <hr> | ===Goal=== <hr> <div> test<br> test<br> test<br> test<br> test<br> test<br> test<br> test<br> test<br> </div> <hr> |- valign="top" | ===DIV=== <hr> <div> test<div></div> test<div></div> test<br>test<div></div> test<div></div> test<div></div>test<div></div> test<div></div> <div></div> <div></div> <div></div> test<div></div> </div> <hr> | ===CENTER=== <hr> <div> test<center></center> test<center></center> test<br>test<center></center> test<center></center> test<center></center>test<center></center> test<center></center> <center></center> <center></center> <center></center> test<center></center> </div> <hr> | ===BR {{HoverText|D:T|display:table;}}=== <hr> <div> test<br style="display:table;"> test<br style="display:table;"> test<br>test<br style="display:table;"> test<br style="display:table;"> test<br style="display:table;">test<br style="display:table;"> test<br style="display:table;"> <br style="display:table;"> <br style="display:table;"> <br style="display:table;"> test<br style="display:table;"> </div> <hr> | ===BR {{HoverText|D:B|display:block;}}=== <hr> <div> test<br style="display:block;"> test<br style="display:block;"> test<br>test<br style="display:block;"> test<br style="display:block;"> test<br style="display:block;">test<br style="display:block;"> test<br style="display:block;"> <br style="display:block;"> <br style="display:block;"> <br style="display:block;"> test<br style="display:block;"> </div> <hr> | ===Goal=== <hr> <div> test<br> test<br> test<br> test<br> test<br> test<br> test<br> test<br> test<br> </div> <hr> |} ==Links of Interest== http://www.quirksmode.org/css/display.html
该页面使用的模板:
模板:HoverText
(
查看源代码
)
模板:PBR
(
查看源代码
)
模板:RightToc
(
查看源代码
)
返回至
模板:PBR/doc
。
导航菜单
个人工具
登录
名字空间
模板
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
网站首页
知识百科
编辑帮助
最近更改
工具
链入页面
相关更改
特殊页面
页面信息