表格

                     4.1表格的基本格式
  格式:
<table>
         <tr>
              <th>...</th>
         </tr>
         <tr>
              <td>...</td>
         </tr>

</table>

                      4.2<table>下的常用属性
属性:
border 像素 设置表格边线
cellspacing 像素 绝对设置 存储格框线宽度
百分比 相对设置 ......
cellpadding 像素 ....... 数据与框线的距离
百分比 ....... 数据与框线的距离
width 像素 ....... 表格宽度
百分比 ....... 表格宽度
height 像素 ....... ....高度
百分比 ....... ....高度
align lefr 表格往左靠(默认)
center 居中
right 右
bgcolor 英文/十六进制 表格的背景颜色
background URL 表格的背景图片
bordercolor 英文/十六进制 边框颜色
bordercolorlight ............ 边框亮度
bordercolordark ....... 暗色


4.3<table>下的边框设置
frame above 显示表格的上边线
rules all 显示全部格框线

4.4<tr><th><td>下的成语属性
width 1 10% 宽
height 1 10% 高
bgcolor red #f00 数据栏内的颜色
align 水平方向 left 数据靠左
center 居中
right 右
valign 垂直方向 top 上
middle 中
bottom 下
nowrap 无 在单元格中换行

4.5拆分与合并单元格
colspan 1 向两边扩展栏位
rowspan 1 下

4.6表格的结构化、直列化、标题
结构化:
<table>
<thead></thead> 表头区
<tbody></tbody> 表体区
<tfoot></tfoot> 表尾区
</table>

直列化:<colgrounp></colgrounp>
align left 靠左
center 中
right 右
valign top 上
middle 中
bottom 下
span 1 直列数目
width 1px 10% 宽度

个别直列设置:
<col>和<colgrounp>一样

标题:
<table>
<caption>表格标题</caption>
</table>
align top 标题在表格上方
bottom 标题在表格下方

结构化:
<table>
<thaed>...</thaed>
<tbody>...</tbody>
..................
<tfoot>...</tfoot>
</table>

posted on 2016-10-24 13:44  加号与剑豪  阅读(104)  评论(0编辑  收藏  举报

导航