HTML4.0元素默认样式整理

所属分类: 网页制作 / HTML/Xhtml 阅读数: 1945
收藏 0 赞 0 分享

复制代码
代码如下:

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; unicode-bidi: embed }
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 }
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, 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, tr { 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"; white-space: pre-line }
center { text-align: center }
: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 }
}
更多精彩内容其他人还在看

html a 链接标签title属性换行鼠标悬停提示内容的换行效果

a链接标签内title属性鼠标悬停提示内容有换行效果,该怎么实现呢?下面由两种不错的方法,大家不妨参考下,希望对大家有所帮助
收藏 0 赞 0 分享

在HTML中引入CSS的几种方式介绍

在HTML中,引入CSS的方法主要有行内式、内嵌式、导入式和链接式,下面针对这几种不同的引入方式给予了使用建议,比较迷惑的朋友可以参考下
收藏 0 赞 0 分享

html area图片热点的使用介绍附相关属性一览表

area标记主要用于图像地图,通过该标记可以在图像地图中设定作用区域(又称为热点),当用户的鼠标移到指定的作用区域点击时,会自动链接到预先设定好的页面,具体使用如下,不会的朋友可以参考下
收藏 0 赞 0 分享

关于label和span设置width无效问题解决方法

大家可能不知道默认情况下label、span 设置width 是无效的,只有当display:block时,我们所设置的width才有效果,下面有个不错的示例,大家可以感受下
收藏 0 赞 0 分享

通过href简单实现点击a链接跳到页面中指定的地方

当点击a标签后,要使其跳到页面里面相应的地方,方法很简单,a标签里面href属性便可轻松做到,将href中的内容和你要跳到这个区域的id同名即可,需要的朋友可以参考下
收藏 0 赞 0 分享

HTML checkbox 点击说明文字即可选择/取消勾选状态

由于checkbox比较小用户操作起来不是很方便,下面就为大家实现下让用户点击说明文字时即可实现 选择/勾选 checkbox,感兴趣的朋友可以参考下
收藏 0 赞 0 分享

按回车表单自动提交问题意外发现

在name输入框中 按回车时,表单就会提交。而且表单中没有submit按钮的,经搜索发现如果表单中只有一个文本框,那么按回车时,就会提交表单,感兴趣的朋友可以了解下
收藏 0 赞 0 分享

html中块注释的使用详细介绍

因为IE各版本的浏览器对我们制作的WEB标准的页面解释不一样,具体就是对CSS的解释不同,我们为了兼容这些,可运用条件注释来各自定义,最终达到兼容的目的。块注释的使用感兴趣的朋友可以参考下
收藏 0 赞 0 分享

HTML超出文本显示省略号...通过text-overflow实现

HTML超出文本显示省略号在一些新闻列表中还是比较常见的一种做法,其实很简单通过text-overflow便可实现,有需要的朋友可以参考下本文
收藏 0 赞 0 分享

DIV常用属性大全自己整理

div布局过程中会经常用到一些属性,本文整理了一些常用的和布局相关的属性,有需要的朋友可以参考下,希望对大家熟悉div常用属性有所帮助
收藏 0 赞 0 分享
查看更多