脚本宝典收集整理的这篇文章主要介绍了HTML 5 Reset Stylesheet,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
这份css reset是在Eric Meyers的 CSS reset基础上修改出来的,特别针对HT
ML5
调整了相应标签的初始化样式。
/*
html5doctor
.COM Reset Stylesheet
v1.4
2009-07-27
Author: Richard Clark - http://richclar
KDEsign.com
*/
html, body, div, span, object, ifr
ame,
h1, h2, h3, h4, h5, h6, p,
blockquote,
PRe,
ab
br, address, c
ITe, code,
del,
DFn, em,
img, ins, kbd, q, samp,
small,
strong, s
ub, sup,
VAR,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, dia
LOG, figure, footer, header,
hgroup, menu, nav, section,
time, mark, audio, video {
m
argin:0;
padding:0;
border:0;
outline:0;
font-
Size:100%;
vert
ical-align:baseline;
background:transparent;
}
body {
line-h
eight:1;
}
article, aside, dialog, figure, footer, header,
hgroup, nav, section {
dis
play:block;
}
nav ul {
list
-style:none;
}
blockquote, q {
quotes:none;
}
blockquote:before, blockquote
:after,
q:before, q:after {
content:”;
content:none;
}
a {
mar
gin:0;
padding:0;
border:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
ins {
background-color:
#ff9;
color:#000;
text-decoration:none;
}
mark {
background-color:#ff9;
color:#000;
font-style:italic;
font-weight:bold;
}
del {
text-decoration: line
-through;
}
abbr[title], dfn[title] {
border-bottom:1px dotted #000;
cursor:hel
p; }
table {
border-collapse:collapse;
border-spacing:0;
}
hr {
display:block;
height:1px;
border:0;
border-top:1px solid #cccccc;
margin:1em 0;
padding:0;
}
input, select {
vertical-align:middle;
}
更新什么内容?
移除了那些在HTML5中不被赞成使用的标签样式,例如<acronym><font><
Big>……添加了HTML5新增标签样式,移除了默认的padding、margin和border,确定指定了那些本
应该当做块级元素来显示的元素的display属性为block。
使用了属性选择器
为<abbr><dfn>元素添加了属性选择器,这是为了在这两个元素有title这个属性的时候为他们指定一个样式,这点是从可访问性的角度考虑的。
讨论
在
锚点上添加outline:0有很严重的可访问性问题,直接导致键盘导航失效。
ins, mark在没有设置
字体颜色的时候不必添加
背景颜色。
更多内容猛点这里:http://html5doctor.com/html-5-reset-stylesheet/
脚本宝典总结
以上是脚本宝典为你收集整理的HTML 5 Reset Stylesheet全部内容,希望文章能够帮你解决HTML 5 Reset Stylesheet所遇到的问题。
如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。