2016/3/1 淘宝 腾讯 网易 css初始化代码 以及最基础的初始化

本文详细介绍了淘宝、腾讯QQ及网易等官方网站使用的CSS样式初始化方法。通过对比不同网站的初始化样式规则,展示了如何消除浏览器默认样式差异,实现统一的页面显示效果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

淘宝官网(http://www.taobao.com/)样式初始化

 1 body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { margin:0; padding:0; } 
 2  body, button, input, select, textarea { font:12px/1.5tahoma, arial, \5b8b\4f53; } 
 3 h1, h2, h3, h4, h5, h6{ font-size:100%; } 
 4  address, cite, dfn, em, var { font-style:normal; } 
 5  code, kbd, pre, samp { font-family:couriernew, courier, monospace; } small{ font-size:12px; }
 6  ul, ol { list-style:none; }
 7  a { text-decoration:none; } 
 8  a:hover { text-decoration:underline; }
 9  sup { vertical-align:text-top; }
10  sub{ vertical-align:text-bottom; }
11  legend { color:#000; }
12  fieldset, img { border:0; }
13  button, input, select, textarea { font-size:100%; }
14  table { border-collapse:collapse; border-spacing:0; }

腾讯QQ官网(http://www.qq.com)样式初始化

1 body,ol,ul,h1,h2,h3,h4,h5,h6,p,th,td,dl,dd,form,fieldset,legend,input,textarea,select{margin:0;padding:0} 
2  body{font:12px"宋体","Arial Narrow",HELVETICA;background:#fff;-webkit-text-size-adjust:100%;}
3  a{color:#2d374b;text-decoration:none} 
4  a:hover{color:#cd0200;text-decoration:underline} 
5 em{font-style:normal} 
6 li{list-style:none} 
7  img{border:0;vertical-align:middle} 
8  table{border-collapse:collapse;border-spacing:0}
9  p{word-wrap:break-word}

网易官网(http://www.163.com/)样式初始化

1 html {overflow-y:scroll;} 
2  body {margin:0; padding:29px00; font:12px"\5B8B\4F53",sans-serif;background:#ffffff;}  div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,blockquote,p{padding:0; margin:0;} 
3  table,td,tr,th{font-size:12px;} 
4 li{list-style-type:none;} 
5  img{vertical-align:top;border:0;} 
6 ol,ul {list-style:none;} 
7  h1,h2,h3,h4,h5,h6{font-size:12px; font-weight:normal;}  address,cite,code,em,th {font-weight:normal; font-style:normal;}

最简单的 css初始化方式   可以用*代替

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

 

转载于:https://www.cnblogs.com/haodayikeshu/p/5229468.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值