HTML元素的默认CSS设置介绍

2016-02-19 21:41 4 1 收藏

今天图老师小编要向大家分享个HTML元素的默认CSS设置介绍教程,过程简单易学,相信聪明的你一定能轻松get!

【 tulaoshi.com - Web开发 】

以下是引用片段:
/**default css style**/
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 }
}

来源:https://www.tulaoshi.com/n/20160219/1626856.html

延伸阅读
标签: Web开发
META元素就是经常在和之间出现的东东。它对访问者本人是不可见的(除非分析HTML源文件),但是,它对浏览器和一些搜索引擎是可见的,用来描述文档特性。本文拟就对实用的和常见的META特性进行讨论。 首先,看一下META所支持的属性: name="" 指定特性名 content="" 指定特性值 scheme="" 命名一个解释特性值的方案 http-equiv="" HTTP...
    程序编制     随着WEB的发展,与浏览者的交互越来越受到网站制作者的重视。现在的主页跟最初的静态主页相比,界面更加友好,功能更加丰富。这些技术需要一些编程语言来完成,如JAVASCRIPT、VBSCRIPT、CGI、ASP等等。要想使自己的网站在因特网的浩瀚海洋里脱颖而出,就必须掌握这些编程语言...
众所周知,制作网页所用到的最基本的语言HTML主要是由著名的W3C组织来制定标准的。但由于IE和NetScape之间都在为击败对手不断地研究新的网页技术而竞争,就产生了不少新的HTML元素。这些新的HTML元素,有的被W3C组织所认证,发展成为所有的浏览器必须支持的HTML标准元素。但有的却仍不被别的浏览器所接受。特别是对于目前最主流的浏览器-IE和Ne...
标签: Web开发
选择器 p[name^=my]{font-size:14px} 选择器 ^= 讲规则应用到所有 name属性以my开头的p元素标签 p[name$=my]{font-size:14px} 选择器 $= 讲规则应用到所有 name属性以my结尾的p元素标签 p[name*=my]{font-size:14px} 选择器 $= 讲规则应用到所有 name属性包含my结尾的p元素上 选择器 、 + 、~ 选择器表示受影响的元素是第一个元素的子...
标签: Web开发
新写的JS 客户端 UI:采用包装模式的思想,富客户端UI就像外壳一样附加到普通的元素上。部分UI使用了两种实现,一种直接使用Html,CSS,JS结合的方式,一种直接使用JS(UI结尾的文件使用这种方式)。看过ExtJS做的,很漂亮,效果很绚,我做不到那种程度,但不喜欢那种编程方式,做ExtJS的的确是CSS,JS的高手,但没有提供良好的面对对象的设计...

经验教程

418

收藏

58
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部