css怎么设置字体大小font-size

html-css09

css怎么设置字体大小font-size,第1张

可以在css里面加入font-size:12px数字根据需要可变化;

一般设置哪一块的就在那个标签内加上字体大小标签即可;

如body {

margin:0 auto

font-size:12px

font-family:Verdana,Arial

color:#666

}

你文字所在的位置来确定css中的选择器了,比如有<p>……</p>或者<h1>……</h1>等,比如有一段文字“<p>你好</p>”,那么要想在css里控制字体的话就应该这样p{font-size:属性值font-family:属性值font-color属性值}以上的属性分别是控制字体大小,字体,颜色的。当然还有一些就类似这样写上就可以了。

body{font-size:"此为你要统一加大的数字"em}如body{font-size:10em}或{font-size:0.5em}

还有一个就是body{font-size:百分几}如body{font-size:10%}试试看