• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

w3c组织给出html4的样式建议

原作者: [db:作者] 来自: [db:来源] 收藏 邀请
这是w3c组织给出html4的样式建议,可惜浏览器们都加上自己的私有属性,让标准成了浮云。不过对于我们仍然是很有参考意义的。
Appendix D. Default style sheet for HTML 4
This appendix is informative, not normative.

This style sheet describes the typical formatting of all HTML 4 ([HTML4]) elements based on extensive research into current UA practice. Developers are encouraged to use it as a default style sheet in their implementations.

The full presentation of some HTML elements cannot be expressed in CSS 2.1, including replaced elements ("img", "object"), scripting elements ("script", "applet"), form control elements, and frame elements.

For other elements, the legacy presentation can be described in CSS but the solution removes the element. For example, the FONT element can be replaced by attaching CSS declarations to other elements (e.g., DIV). Likewise, legacy presentation of presentational attributes (e.g., the "border" attribute on TABLE) can be described in CSS, but the markup in the source document must be changed.

html, address, 
blockquote, 
body, dd, div, 
dl, dt, fieldset, form, 
frame, frameset, 
h1, h2, h3, h4, 
h5, h6, noframes, 
ol, p, ul, center
dir, hr, menu, pre   { displayblock } 
li              { displaylist-item } 
head            { displaynone } 
table           { display: table } 
tr              { displaytable-row } 
thead           { displaytable-header-group } 
tbody           { displaytable-row-group } 
tfoot           { displaytable-footer-group } 
col             { displaytable-column } 
colgroup        { displaytable-column-group } 
td, th          { displaytable-cell } 
caption         { displaytable-caption } 
th              { font-weightboldertext-aligncenter } 
caption         { text-aligncenter } 
body            { margin8px } 
h1              { font-size2emmargin: .67em 0 } 
h2              { font-size1.5emmargin: .75em 0 } 
h3              { font-size1.17emmargin: .83em 0 } 
h4, p, 
blockquote, ul, 
fieldset, form, 
ol, dl, dir, 
menu            { margin1.12em 0 } 
h5              { font-size: .83emmargin1.5em 0 } 
h6              { font-size: .75emmargin1.67em 0 } 
h1, h2, h3, h4, 
h5, h6, b, 
strong          { font-weightbolder } 
blockquote      { margin-left40pxmargin-right40px } 
i, cite, em, 
var, address    { font-styleitalic } 
pre, tt, code
kbd, samp       { font-family: monospace } 
pre             { white-spacepre } 
button, textarea, 
input, select   { displayinline-block } 
big             { font-size1.17em } 
smallsub, sup { font-size: .83em } 
sub             { vertical-alignsub } 
sup             { vertical-alignsuper } 
table           { border-spacing2px; } 
thead, tbody, 
tfoot           { vertical-alignmiddle } 
td, th, tr      { vertical-align: inherit } 
s, strike, del  { text-decorationline-through } 
hr              { border1px inset } 
ol, ul, dir, 
menu, dd        { margin-left40px } 
ol              { list-style-typedecimal } 
ol ul, ul ol, 
ul ul, ol ol    { margin-top0margin-bottom0 } 
u, ins          { text-decorationunderline } 
br:before       { content"\A"white-spacepre-line } 
center          { text-aligncenter } 
:link, :visited { text-decorationunderline } 
:focus          { outlinethin dotted invert } 
 
/* Begin bidirectionality settings (do not change) */ 
BDO[DIR="ltr"]  { directionltrunicode-bidibidi-override } 
BDO[DIR="rtl"]  { directionrtlunicode-bidibidi-override } 
 
*[DIR="ltr"]    { directionltrunicode-bidiembed } 
*[DIR="rtl"]    { directionrtlunicode-bidiembed } 
 
@media print { 
  h1            { page-break-beforealways } 
  h1, h2, h3, 
  h4, h5, h6    { page-break-afteravoid } 
  ul, ol, dl    { page-break-beforeavoid } 
}
Appendix D. Default style sheet for HTML 4

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
IE6 空格bug修正方法发布时间:2022-06-21
下一篇:
IE6下网页制作参考 IE6 默认样式发布时间:2022-06-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap