<table align="center" cellpadding="0" cellspacing="0" width="963">
首先是表格里的两个标签,“cellpadding”用来设定字与表格边缘的距离。“cellspacing”标签设定表格和表格之间的距离
<td width="687" height="13" bgcolor="#6699FF">
“bgcolor”标签用来设定单元格的颜色,而且不影响在此单元格编辑内容。
如果你想插入一个纯色的图片,图片上面写字,那么直接用用“bgcolor”标签,这样更方便。
<html>
<head>
<meta charset="utf-8" />
<title>divcss5 css行间距实例</title>
<style>
.divcss5-a{ line-height:22px}/* css 注释说明:设置行距行高22px */
.divcss5-b{ line-height:40px}/* 设置行距行高22px */
</style>
</head>
<body>
<div class="divcss5-a">
我被设置行高22px<br />
我行距为22培训<br />
DIVCSS5占位内容
</div>
<div class="divcss5-b">
我被设置行高40px<br />
我行距为40培训<br />
DIVCSS5占位内容
</div>
</body>
</html>
这个是用css设定行间距,可以设定整个表格的行间距
<table style="text-align: center; line-height: 20pt"></table>
“text-align”标签设置文字对齐方式,center是居中对齐,“line-height”定义行间距
<p align="center"><span style="font-size:24pt;"><font face="宋体" color="red"><b>3啊啊啊啊啊啊啊啊</b></font></span></p>
在中间大框架table标签加上style='MARGIN-TOP: 0px; ' 就可以达到顶端无缝。
发表评论: