这份css reset是在Eric Meyers的 CSS reset基础上修改出来的,特别针对HTML5调整了相应标签的初始化样式。
/*
html5doctor.com Reset Stylesheet
v1.4
2009-07-27
Author: Richard Clark - http://richclarkdesign.com
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, dialog, figure, footer, header,
hgroup, menu, nav, section,
time, mark, audio, video {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
body {
line-height:1;
}
article, aside, dialog, figure, footer, header,
hgroup, nav, section {
display:block;
}
nav ul {
list-style:none;
}
blockquote, q {
quotes:none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content:”;
content:none;
}
a {
margin: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:help;
}
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/
/*
html5doctor.com Reset Stylesheet
v1.4
2009-07-27
Author: Richard Clark - http://richclarkdesign.com
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, dialog, figure, footer, header,
hgroup, menu, nav, section,
time, mark, audio, video {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
body {
line-height:1;
}
article, aside, dialog, figure, footer, header,
hgroup, nav, section {
display:block;
}
nav ul {
list-style:none;
}
blockquote, q {
quotes:none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content:”;
content:none;
}
a {
margin: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:help;
}
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/
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
暂无评论...
P70系列延期,华为新旗舰将在下月发布
3月20日消息,近期博主@数码闲聊站 透露,原定三月份发布的华为新旗舰P70系列延期发布,预计4月份上市。
而博主@定焦数码 爆料,华为的P70系列在定位上已经超过了Mate60,成为了重要的旗舰系列之一。它肩负着重返影像领域顶尖的使命。那么这次P70会带来哪些令人惊艳的创新呢?
根据目前爆料的消息来看,华为P70系列将推出三个版本,其中P70和P70 Pro采用了三角形的摄像头模组设计,而P70 Art则采用了与上一代P60 Art相似的不规则形状设计。这样的外观是否好看见仁见智,但辨识度绝对拉满。
更新日志
2024年05月16日
2024年05月16日
- 黑帝斯哈迪斯2流派玩法推荐 黑帝斯哈迪斯太难了怎么玩
- 黑帝斯哈迪斯2流派推荐 黑帝斯哈迪斯2雷冰法阵流构筑分享
- 鸣潮秧秧声骸怎么选择 秧秧声骸搭配及词条选择攻略
- 藍井エイル《AUBE》[WAV+CUE]
- 潘盈.1993-旧情绵绵【名将】【WAV+CUE】
- 谭小环.1997-自主【BMG】【WAV+CUE】
- 张震岳《精选 滚石SACD系列》首批限量编号 [SACD ISO][1.1G]
- 童丽《独家爱唱7》头版限量编号24K金碟[DFF][1.6G]
- 韩宝仪《我心若玫瑰》[WAV+CUE][441M]
- 群星《经典老歌百万畅销LP黑胶》10CD[WAV+CUE][6.3G]
- 蔡琴《伤心小站SACD》[DSF][1.1G]
- 群星《青春重置计划 4 珍稀》[320K/MP3][207.12MB]
- 黑帝斯哈迪斯2女巫之杖法杖图鉴及附魔效果一览 法杖图文攻略
- 鸣潮炽霞声骸怎么选择 炽霞声骸搭配及词条选择攻略
- 黑帝斯哈迪斯2姊妹双刃图鉴及附魔效果一览 黑帝斯哈迪斯2全武器图文介绍