CSS初始化

CSS初始化是指重设浏览器的样式。不同的浏览器默认的样式可能不尽相同,所以开发时的第一件事可能就是如何把它们统一。如果没对CSS初始化往往会出现浏览器之间的页面差异。

 

个人的CSS初始化

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { margin: 0; padding: 0; } body { background: #fff; color: #555; font-size: 14px; font-family: Verdana, Arial, Helvetica, sans-serif; } td,th,caption { font-size: 14px; } h1, h2, h3, h4, h5, h6 { font-weight: normal; font-size: 100%; } address, caption, cite, code, dfn, em, strong, th, var { font-style: normal; font-weight: normal;} a { color: #555; text-decoration: none; } a:hover { text-decoration: underline; } img { border: none; } ol,ul,li { list-style: none; } input, textarea, select, button { font: 14px Verdana,Helvetica,Arial,sans-serif; } table { border-collapse: collapse; } html { overflow-y: scroll;}


然后我会加上一些自己惯用的CSS一起存档,如果没用到再进行删改(随使用更新)。

.w{width: 1000px;margin:0 auto;}
.fl{float:left;}
.fr{float:right;}

 

转载于:https://www.cnblogs.com/pearl8/p/7979798.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值