国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > HTML > 正文

HTML 5 Reset Stylesheet

2024-08-26 00:09:37
字體:
來源:轉載
供稿:網友

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 平远县| 高雄市| 昆山市| 保康县| 全州县| 吉木乃县| 洞口县| 连江县| 霍林郭勒市| 阜阳市| 邛崃市| 安康市| 灌云县| 鄂温| 丰都县| 五莲县| 许昌市| 福海县| 醴陵市| 东乡| 崇明县| 九龙城区| 鸡泽县| 徐闻县| 临沧市| 新昌县| 曲松县| 运城市| 庆安县| 来安县| 将乐县| 海淀区| 嘉定区| 英德市| 太和县| 桃园市| 灵石县| 镇康县| 山丹县| 南漳县| 中牟县|