栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > Web开发 > Html/CSS > CSS教程

默认样式处理:reset.css 和 normalize.css

CSS教程 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

默认样式处理:reset.css 和 normalize.css

reset.css


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, canvas, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
    margin:0;
    padding:0;
    border:0;
    outline:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
}

body {
    line-height:1;
}

:focus {
    outline: 1;
}

article,aside,canvas,details,figcaption,figure,
footer,header,hgroup,menu,nav,section,summary { 
    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;
}

normalize.css
(保留英文注释)






html {
  line-height: 1.15; 
  -ms-text-size-adjust: 100%; 
  -webkit-text-size-adjust: 100%; 
}





article,
aside,
footer,
header,
nav,
section {
  display: block;
}



h1 {
  font-size: 2em;
  margin: 0.67em 0;
}





figcaption,
figure,
main { 
  display: block;
}



figure {
  margin: 1em 40px;
}



hr {
  box-sizing: content-box; 
  height: 0; 
  overflow: visible; 
}



pre {
  font-family: monospace, monospace; 
  font-size: 1em; 
}





a {
  background-color: transparent; 
  -webkit-text-decoration-skip: objects; 
}



abbr[title] {
  border-bottom: none; 
  text-decoration: underline; 
  text-decoration: underline dotted; 
}



b,
strong {
  font-weight: inherit;
}



b,
strong {
  font-weight: bolder;
}



code,
kbd,
samp {
  font-family: monospace, monospace; 
  font-size: 1em; 
}



dfn {
  font-style: italic;
}



mark {
  background-color: #ff0;
  color: #000;
}



small {
  font-size: 80%;
}



sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}





audio,
video {
  display: inline-block;
}



audio:not([controls]) {
  display: none;
  height: 0;
}



img {
  border-style: none;
}



svg:not(:root) {
  overflow: hidden;
}





button,
input,
optgroup,
select,
textarea {
  margin: 0;
}



button,
input { 
  overflow: visible;
}



button,
select { 
  text-transform: none;
}



button,
html [type="button"], 
[type="reset"],
[type="submit"] {
  -webkit-appearance: button; 
}



button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}



button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}



legend {
  box-sizing: border-box; 
  color: inherit; 
  display: table; 
  max-width: 100%; 
  padding: 0; 
  white-space: normal; 
}



progress {
  display: inline-block; 
  vertical-align: baseline; 
}



textarea {
  overflow: auto;
}



[type="checkbox"],
[type="radio"] {
  box-sizing: border-box; 
  padding: 0; 
}



[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}



[type="search"] {
  -webkit-appearance: textfield; 
  outline-offset: -2px; 
}



[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}



::-webkit-file-upload-button {
  -webkit-appearance: button; 
  font: inherit; 
}





details, 
menu {
  display: block;
}



summary {
  display: list-item;
}





canvas {
  display: inline-block;
}



template {
  display: none;
}





[hidden] {
  display: none;
}
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/243082.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号