2011年9月6日星期二

HTML 5 Reset Stylesheet

HTML 5 Reset Stylesheet

http://www.inspirr.com

這份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/

  Tag: 設計公司 | 網頁設計公司 | 廣告公司 | 網站設計 | 平面設計 | 互動媒體 | 網頁設計 | Web design | Website design | design house | 媒體公司 | Iphone app | 程式設計 | Flash 網頁 | Flash game | 動畫設計 | 後期製作 | 網上商店 | 網上宣傳 | 網頁服務 |

没有评论:

发表评论