用CSS样式如何控制网页中所有文字大小

html-css05

用CSS样式如何控制网页中所有文字大小,第1张

那就是顶部有个?/* CSS Document */ body { margin: 0font-family: Arial, Helvetica, sans-serifbackgroundr:#FFF554font-size: 14px} #top_header,#top, #header, #nav, #main, #footer { width: 960pxmargin: 0px autoclear:bothcursor:url(' http://pic.51.com/shop/product/sbys/ani/1000400002.ani' )就是那个14px,一般都是12px的,你改一下就是了,觉得有 用的话去下我的网站, www.shi5713.lingd.net

CSS里用一个样式把表格里所有文字都放中间,首先需要理解父级元素的概念,要让所有的表格文字都居中,那么CSS的文字居中属性,自然就要给table,然后通过text-align:center这个属性,就能够所有的文字居中,请看代码:

<html>

<head>

<style>

table{ //通过class来设置

width:300px

height:200px

text-align:center

}

</style>

</head>

<body>

<table>

<tr>

<td>我是测试文字</td>

</tr>

</table>

</body>

</html>