网页制作 
首页 > 网页制作 > 浏览文章

css重置浏览器字体大小示例分享

(编辑:jimmy 日期: 2024/5/8 浏览:3 次 )

如果你不想下载9MB的文件,代码如下:


复制代码代码如下:
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; }


其次,我们重设浏览器字体的大小为10像素,使用如下:

html {font-size: 62.5%;}

这个大小基本合适,然后您可以根据自己的需要调整大小,如 标题1为120像素:
h1 {font-size: 2em;}

上一篇:网页引入css样式的几种方法
下一篇:IE6/IE7中li底部4px空隙的Bug
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网