网络编程
位置:首页>> 网络编程>> 网页设计>> Css Reset(复位)整理(2)

Css Reset(复位)整理(2)

作者:愚人码头 来源:WEB前端开发 发布时间:2008-09-09 21:58:00 

标签:浏览器,复位,css

Poor Man’s Reset
其实这也是我们常用的一类Css Reset.对字体的大小复位,以及图片链接的边框处理.
也经常在某些站点看到

html, body {   
 padding: 0;   
 margin: 0;   
 }   
html {   
 font-size: 1em;   
 }   
body {   
 font-size: 100%;   
 }   
a img, :link img, :visited img {   
 border: 0;   
 }   

Shaun Inman’s Global Reset
作者认为Shaun写这类的Css Reset是有某种目的性.
而且这类规则是针对的是某些重要的常用浏览器.
比如ie,firefox等

body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre,    
form, fieldset, input, p, blockquote, table, th, td, embed, object {   
 padding: 0;   
 margin: 0;    
 }   
table {   
 border-collapse: collapse;   
 border-spacing: 0;   
 }   
fieldset, img, abbr {   
 border: 0;   
 }   
address, caption, cite, code, dfn, em,    
h1, h2, h3, h4, h5, h6, strong, th, var {   
 font-weight: normal;   
 font-style: normal;   
 }   
ul {   
 list-style: none;   
 }   
caption, th {   
 text-align: left;   
 }   
h1, h2, h3, h4, h5, h6 {   
 font-size: 1.0em;   
 }   
q:before, q:after {   
 content: '';   
 }   
a, ins {   
 text-decoration: none;   
 } 

  

Yahoo CSS Reset
yahoo这帮家伙写的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;   
 }

 

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com