css重置浏览器字体大小示例分享
css重置浏览器字体大小示例分享
发布时间:2016-12-27 来源:查字典编辑
摘要:如果你不想下载9MB的文件,代码如下:body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,fo...

如果你不想下载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;}

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新 Div+Css教程学习
热门 Div+Css教程学习
网页设计子分类