reset.css的CSS Reset的内容是什么?

 我来答
荼蘼☆矿
推荐于2018-05-04 · 超过11用户采纳过TA的回答
知道答主
回答量:77
采纳率:100%
帮助的人:4.9万
展开全部

最简单的CSS Reset内容寥寥几行就能完成: * { padding: 0; margin: 0; border: 0; } (但由于燃枣档性能较低,不推荐使用)
这个方法让所有的选择器的岩猜padding、margin和border都设置成0。也有内容更多的,比如YUI的CSS Reset内容: body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,
form,fieldset,input,textarea,p,blockquote,th,td {
padding: 0;
margin: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
fieldset,img {
border: 0;
}
address,caption,cite,code,dfn,em,strong,th,var {
font-weight: normal;
font-style: normal;
}
ol,ul {
list-style: none;
}
caption,th {
text-align: left;
}
h1,h2,h3,h4,h5,h6 {
font-weight: normal;
font-size: 100%;
}
q:before,q:after {
content:'';
}
abbr,acronym { border: 0;
} 以及国外皮乱名人Eric Meyer的CSS Reset V1.0|200802内容: html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before,blockquote:after,
q:before, q:after {
content: '';
content: none;
}
/* remember to define focus styles! */
:focus {
outline: 0;}
/* remember to highlight inserts somehow! */
ins {
text-decoration: none;
}
del {
text-decoration: line-through;
}
/* tables still need 'cellspacing=0' in the markup */
table {
border-collapse: collapse;
border-spacing: 0;
} Eric Meyer V2.0|20110126
html, body, div, span, applet, object, iframe,h1, h2, h3, h4, h5, h6,  p, blockquote, pre,a, abbr, acronym, address, big, cite, code,del, dfn, em,   img, ins, kbd, q, s, samp,small, strike, strong, sub, sup, tt, var,b, u, i, center,  dl, dt, dd, ol, ul, li,fieldset, form, label, legend,table, caption,   tbody, tfoot, thead, tr, th, td,article, aside, canvas, details, embed,   figure, figcaption, footer, header, hgroup, menu, nav, output,  ruby, section, summary,time, mark, audio, video {  margin: 0;padding: 0;border: 0;font-size: 100%;font: inherit;vertical-align: baseline;  }  /* HTML5 display-role reset for older browsers */  article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {  display: block;}body {line-height: 1;  }  ol, ul {list-style: none;  }blockquote, q {quotes: none;}  blockquote:before, blockquote:after,  q:before, q:after {content: '';content: none;}table {border-collapse: collapse;border-spacing: 0;} 大家可以看得出来,这些内容方法不同,但功能大同小异,都是起到重置的作用,所以说CSS Reset是根据个人需求不同可以按需自定义的。

推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式