CSS Reset,意为重置默认样式。HTML中绝大部分标签元素在网页显示中都有一个默认属性值,通常为了避免重复定义元素样式,需要进行重置默认样式(CSS Reset)。举几个例子:1.淘宝(CSS Reset):html {overflow-x:auto;overflow-y:scroll;}body, dl, dt, dd, ul, ol, li, pre, form, fieldset, input, p, blockquote, th, td {font-weight:400;margin:0;padding:0;}h1, h2, h3, h4, h4, h5 {margin:0;padding:0;}body {background-color:#FFFFFF;color:#666666;font-family:Helvetica,Arial,sans-serif;font-size:12px;padding:0 10px;text-align:left;}select {font-size:12px;}table {border-collapse:collapse;}fieldset, img {border:0 none;}fieldset {margin:0;padding:0;}fieldset p {margin:0;padding:0 0 0 8px;}legend {display:none;}address, caption, em, strong, th, i {font-style:normal;font-weight:400;}table caption {margin-left:-1px;}hr {border-bottom:1px solid #FFFFFF;border-top:1px solid #E4E4E4;border-width:1px 0;clear:both;height:2px;margin:5px 0;overflow:hidden;}ol, ul {list-style-image:none;list-style-position:outside;list-style-type:none;}caption, th {text-align:left;}q:before, q:after, blockquote:before, blockquote:after {content:””;}2.百度(CSS Reset):body {font-family:arial,helvetica,sans-serif;font-size:13px;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:normal;line-height:1.4;text-align:center;}body, ul, ol, dl, dd, h1, h2, h3, h4, h5, h6, p, form, fieldset, legend, input, textarea, select, button, th, td {margin:0;padding:0;}h1, h2, h3, h4, h5, h6 {font-size:100%;font-weight:normal;}table {font-size:inherit;}input, select {font-family:arial,helvetica,clean,sans-serif;font-size:100%;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;}button {overflow:visible;}th, em, strong, b, address, cite {font-style:normal;font-weight:normal;}li {list-style-image:none;list-style-position:outside;list-style-type:none;}img, fieldset {border:0 none;}ins {text-decoration:none;}3.《超越css》(CSS Reset):/* Normalizes margin,padding */body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td { margin:0;padding:0}/* Normalizes font-size for headers */h1,h2,h3,h4,h5,h6 { font-size:100%}/* Removes list-style from lists */ol,ul { list-style:none }/* Normalizes font-size and font-weight to normal */address,caption,cite,code,dfn,em,strong,th,var { font-size:normal; font-weight:normal }/* Removes list-style from lists */table { border-collapse:collapse; border-spacing:0 }/* Removes border from fieldset and img */fieldset,img { border:0 }/* Left-aligns text in caption and th */caption,th { text-align:left }/* Removes quotation marks from q */q:before,q:after { content:”}4.Eric Meyer(CSS Reset)——推荐: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;}5.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 {margin:0;padding:0;}table {border-collapse:collapse;border-spacing:0;}fieldset,img {border:0;}address,caption,cite,code,dfn,em,strong,th,var {font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6 {font-size:100%;font-weight:normal;}q:before,q:after {content:”;}abbr,acronym { border:0;}

以上来自 Eason_Severus 的CSDN 博客 

CSS Reset 2.0标准

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;}

转载于:https://www.cnblogs.com/shanghongyun/p/9692290.html

reset.css(样式重置)相关推荐

  1. Css Reset -Css样式重置

      在网页实际开发过程中,如果将来网页的浏览者存在使用不同的浏览器(IE, Google, FireFox, Opera, Safari等)对网页进行解析展示的可能,那么我们就不得不从完美的理想预期中 ...

  2. 常见网站CSS样式重置

    腾讯 1 2 3 4 5 6 7 8 9 body,ol,ul,h1,h2,h3,h4,h5,h6,p,th,td,dl,dd,form,fieldset,legend,input,textarea, ...

  3. vue或者react的css样式初始(css样式重置)——reset.css与normalize.css

    前言 为什么要样式重置即 css reset ? 原因:不同的浏览器在实现w3c标准过程中,对各个元素的实现是不一致的.这就导致了同一个页面在不同的浏览器中比如ie和chrome中,表现有差异.为了解 ...

  4. css样式重置,不建议用通配符

    由于各个浏览器对css样式的默认样式不一致,所以有必要进行样式重置.在网上看到很多建议使用 *{margin:0;padding:0} 重置margin和padding.建议不这样子使用,原因主要是性 ...

  5. 现代CSS样式重置最佳实践!

    目录 1. box-sizing 模型 2. 移除默认 margin 3. 基于百分比的高度 4. 调整行高 5. 平滑字体 6. 媒体默认值 7. 继承表单控件的字体 8. 自动换行 9. 根层叠上 ...

  6. CSS Reset(样式重置)

    CSS Reset,意为重置默认样式.HTML中绝大部分标签元素在网页显示中都有一个默认属性值,通常为了避免重复定义元素样式,需要进行重置默认样式(CSS Reset).举几个例子: 1.淘宝(CSS ...

  7. Normalize.css和Reset CSS有什么区别?

    我知道CSS重置是什么,但是最近我听说了这个叫做Normalize.css的新东西. Normalize.css和Reset CSS有什么区别? 标准化CSS和重置CSS有什么区别? CSS重置只是一 ...

  8. 如何做默认样式重置?RESETTING 和 NORMALIZING 之间有什么区别?

    这里是修真院前端小课堂,每篇分享文从 [背景介绍][知识剖析][常见问题][解决方案][编码实战][扩展思考][更多讨论][参考文献] 八个方面深度解析前端知识/技能,本篇分享的是: [如何做默认样式 ...

  9. CSS Reset(css的初始化)

    不同的浏览器对每种的标签都有默认的样式.大部分浏览器的样式还有点区别.为了保证让所有的标签的样式清零,也就是重置,以便于我们后续的开发和管 理,一般都会在网站一开始对所有的标签做一下样式的重置操作,为 ...

  10. CSS reset的重新审视 – 避免样式重置

    一.CSS reset(CSS重置)的历史 根据淘宝射雕的叙述,最早的一份CSS reset来自Tantek 的undohtml.css,很简单的代码,Tantek 根据自己的需要,对浏览器的默认样式 ...

最新文章

  1. Flutter开发之Text的overflow属性不生效(14)
  2. python function if yield_Python中的yield关键字
  3. uva 1614奇怪的股市(归纳法证明,贪心)
  4. caffe.pb.h丢失问题:
  5. 连接impala出现method not supported_Impala在网易大数据的优化和实践
  6. 卸载oracle11g步骤_oracle11g完全卸载步骤来了,你真的不来看看吗
  7. 在Windows平台使用SSH连接Linux服务器
  8. cfd初学者怎么调试适合自己使用的linux系统
  9. 个人或公司微信公众号迁移转让流程,公证需要资料,订阅号服务号转移教程,怎么迁移
  10. android Aidl原理分析
  11. 使用列表实现筛选法求素数
  12. 电脑怎么批量修改图片大小kb?
  13. MP4文件格式详解——元数据moov(一)mvhd box
  14. 管理计算机域的内置账户怎么取消,如何删除供来宾访问计算机或访问域的内置账?...
  15. 恐怖的代码,以及转载
  16. 忽略wx公众号网页授权域名验证
  17. 现代信号处理教程第二版(胡广书)学习笔记
  18. 使用activeMQ发送短信验证码
  19. go (golang) DNS域名解析实现
  20. JAVA12_12学习总结(JavaScript)

热门文章

  1. R语言ETL工程:集合运算(intersect/union/setdiff)
  2. 【aRsenal-1】用R创建Word和PowerPoint文档
  3. Android 隐藏环形进度条,Android环形进度条
  4. Redis学习之字典源码分析
  5. qW3xt.2服务器病毒
  6. VB.net数据库编程pdf
  7. spring boot 报错
  8. Bootstrap-点击“×”,可以关闭页面
  9. 经常使用的文件工具类
  10. BAT经典面试题,深入理解Java内存模型JMM