验证码: 看不清楚,换一张 查询 注册会员,免验证
  • {{ basic.site_slogan }}
  • 打开微信扫一扫,
    您还可以在这里找到我们哟

    关注我们

css怎么重置浏览器字体大小

阅读:382 来源:乙速云 作者:代码code

css怎么重置浏览器字体大小

代码如下:

body,div,dl,dt,dd,ul,ol,li,h2,h3,h4,h5,h6,h7,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; }
h2,h3,h4,h5,h6,h7 { font-size:100%; font-weight:normal; }
q:before,q:after { content:”; }
abbr,acronym { border:0; }

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

html {font-size: 62.5%;}

这个大小基本合适,然后您可以根据自己的需要调整大小,如 标题1为120像素:

h2 {font-size: 2em;}

css的基本语法是什么

css的基本语法是:

1、css规则由选择器和一条或多条声明两个部分构成;

2、选择器通常是需要改变样式的HTML元素;

3、每条声明由一个属性和一个值组成;

4、属性和属性值被冒号分隔开。

分享到:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: hlamps#outlook.com (#换成@)。
相关文章
{{ v.title }}
{{ v.description||(cleanHtml(v.content)).substr(0,100)+'···' }}
你可能感兴趣
推荐阅读 更多>