当前位置:首页 > 设计在线 > 网页设计 > CSS/Xhtml > 总结知识:HTML默认样式表CSS属性汇总

总结知识:HTML默认样式表CSS属性汇总

点击次数:34 次 发布日期:2008-11-26 22:57:45 作者:源代码网
源代码网推荐 开始的时候 *{margin:0;padding:0;},当需要使用边距的时候,就需要还原HTML默认CSS值了。

  以前一直在找这份文档,今天偶然在w3上看到了。除了inline和block的定义,主要是要注意

  body|h1~h6|blockquote|menu|ul|ol|dd等标签的默认样式(margin和font-size)。

  这个东西在你需要还原默认值的时候,比较有用。 详见下面的内容:

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   { display: block }
源代码网推荐li              { display: list-item }
源代码网推荐head            { display: none }
源代码网推荐table           { display: table }
源代码网推荐tr              { display: table-row }
源代码网推荐thead           { display: table-header-group }
源代码网推荐tbody           { display: table-row-group }
源代码网推荐tfoot           { display: table-footer-group }
源代码网推荐col             { display: table-column } 
源代码网推荐colgroup        { display: table-column-group }
源代码网推荐td, th          { display: table-cell; }
源代码网推荐caption         { display: table-caption }
源代码网推荐th              { font-weight: bolder; text-align: center }
源代码网推荐caption         { text-align: center }
源代码网推荐body            { margin: 8px; line-height: 1.12 }
源代码网推荐h1              { font-size: 2em; margin: .67em 0 }
源代码网推荐h2              { font-size: 1.5em; margin: .75em 0 }
源代码网推荐h3              { font-size: 1.17em; margin: .83em 0 }
源代码网推荐h4, p,
源代码网推荐blockquote, ul,
源代码网推荐fieldset, form,
源代码网推荐ol, dl, dir,
源代码网推荐menu            { margin: 1.12em 0 } 

h5              { font-size: .83em; margin: 1.5em 0 }
源代码网推荐h6              { font-size: .75em; margin: 1.67em 0 }
源代码网推荐h1, h2, h3, h4,
源代码网推荐h5, h6, b,
源代码网推荐strong          { font-weight: bolder }
源代码网推荐blockquote      { margin-left: 40px; margin-right: 40px }
源代码网推荐i, cite, em,
源代码网推荐var, address    { font-style: italic }
源代码网推荐pre, tt, code,
源代码网推荐kbd, samp       { font-family: monospace }
源代码网推荐pre             { white-space: pre }
源代码网推荐button, textarea,
源代码网推荐input, object, 
源代码网推荐select          { display:inline-block; }
源代码网推荐big             { font-size: 1.17em }
源代码网推荐small, sub, sup { font-size: .83em }
源代码网推荐sub             { vertical-align: sub } 
源代码网推荐sup             { vertical-align: super }
源代码网推荐table           { border-spacing: 2px; }
源代码网推荐thead, tbody,
源代码网推荐tfoot           { vertical-align: middle }
源代码网推荐td, th          { vertical-align: inherit }
源代码网推荐s, strike, del  { text-decoration: line-through }
源代码网推荐hr              { border: 1px inset }
源代码网推荐ol, ul, dir,
源代码网推荐menu, dd        { margin-left: 40px }
源代码网推荐ol              { list-style-type: decimal }
源代码网推荐ol ul, ul ol,
源代码网推荐ul ul, ol ol    { margin-top: 0; margin-bottom: 0 }
源代码网推荐u, ins          { text-decoration: underline }
源代码网推荐br:before       { content: "A" }
源代码网推荐:before, :after { white-space: pre-line } 

center          { text-align: center }
源代码网推荐abbr, acronym   { font-variant: small-caps; letter-spacing: 0.1em }
源代码网推荐:link, :visited { text-decoration: underline }
源代码网推荐:focus          { outline: thin dotted invert }

/* Begin bidirectionality settings (do not change) */
源代码网推荐BDO[DIR="ltr"]  { direction: ltr; unicode-bidi: bidi-override }
源代码网推荐BDO[DIR="rtl"]  { direction: rtl; unicode-bidi: bidi-override }

*[DIR="ltr"]    { direction: ltr; unicode-bidi: embed }
源代码网推荐*[DIR="rtl"]    { direction: rtl; unicode-bidi: embed }

@media print {
源代码网推荐  h1            { page-break-before: always }
源代码网推荐  h1, h2, h3,
源代码网推荐  h4, h5, h6    { page-break-after: avoid }
源代码网推荐  ul, ol, dl    { page-break-before: avoid }


源代码网供稿.
上一篇: 类的建立  下一篇: 可移动层的实现示例
网友评论 (0)
会员中心
设计在线
本站推荐
设计在线之精华