网页设计,让人最头疼的莫过于让页面兼容各大浏览器,准确些是兼容它们“默认”的CSS样式表。
第一种方式

 * {margin:0px; padding:0px;}

这行代码虽然简单,但却让网页解析太慢。
于是出现了几种CSS重置方法:

第二种方式
NETTUTS上的 Jeffrey Way写了篇文章Weekend Quick Tip: Create Your Own Simple Reset.css File
释出自己用来重置CSS样式表的方法

 body, html, div, blockquote, img, label, p, h1, h2, h3, h4, h5, h6, pre, ul, ol,
li, dl, dt, dd, form, a, fieldset, input, th, td
{margin:; padding:; border:; outline: none;}
body{line-height:;font-size: 88% /* Decide for yourself if you want to include this. */;}
h1, h2, h3, h4, h5, h6{font-size: 100%;padding: .6em 0;margin: 0 15px;}
ul, ol{list-style: none;}
a{color: black;text-decoration: none;}
a:hover
{text-decoration: underline;}
.floatLeft{float: left;padding: .5em .5em .5em 0;}
.floatRight{float: right;padding: .5em 0 .5em .5em;}

这个方法适用于大多数的网页设计。

第三种方式
这个重置的太多

 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:;
padding:;
border:;
outline:;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {line-height:;}
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:;} /* 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:;}

第四种方式
还有今天sofish提到的Yahoo的YUI提供的CSS重置文件

 body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
margin:;
padding:;
}
table {border-collapse:collapse;border-spacing:;}
fieldset,img { border:;}
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:;}

最新文章

  1. 解读ASP.NET 5 & MVC6系列(16):自定义View视图文件查找逻辑
  2. 哈希表用于Key与Value的对应
  3. Python基础:序列(字符串)
  4. 汇顶科技&&硬件类笔试题目
  5. route命令(转)
  6. Pdf 字段加粗相关资料
  7. 使用Machin公式计算
  8. Servlet和JAVA BEAN 分析探讨
  9. VS2015+AngularJS+Ionic开发
  10. Linux企业级项目实践之网络爬虫(24)——定制规则扩展为垂直爬虫
  11. JavaEE Tutorials (6) - 使用嵌入式企业bean容器
  12. opencv鼠标操作及GUI矩形绘画
  13. 大数据 --> 安装Hadoop-单机模式(1)
  14. Windows安装TensorFlow
  15. MySQL8.0新特性——支持原子DDL语句
  16. vue 周期函数
  17. 白话Spring(基础篇)---AOP(execution表达式)
  18. PHP如何发送邮件
  19. magento 为用户注册增加一个字段(转)
  20. 【LeetCode】Unique Binary Search Trees II 异构二叉查找树II

热门文章

  1. hybrid开发设计
  2. JavaScript高级之词法作用域和作用域链
  3. Base64 算法原理,以及编码、解码【加密、解密】 介绍
  4. sql server 2008 提示评估期已过的解决方法(升级无效)
  5. how to create a framework for ios . cool!
  6. LoRaWAN协议(一)--架构解析
  7. [pyhton]python内建方法
  8. linux 系统管理 使用技巧
  9. node-gyp rebuild 卡住?
  10. .Net魔法堂:史上最全的ActiveX开发教程——发布篇