zoukankan      html  css  js  c++  java
  • html 表格

    HeadingAnother Heading
    row 1, cell 1 row 1, cell 2
    row 2, cell 1 row 2, cell 2

    背景颜色:

    First Row
    Second Row

    背景图像:

    First Row
    Second Row

    这个表格没有边框:

    100 200 300
    400 500 600

    这个表格也没有边框:

    100 200 300
    400 500 600

    横跨两列的单元格:

    姓名电话
    Bill Gates 555 77 854 555 77 855

    横跨两行的单元格:

    姓名 Bill Gates
    电话 555 77 854
    555 77 855
    【表格举例】
     列-A列-B列-C
    行-1 A1 B1 C1-C2
    行-2 A2 B2
    行-3 A3 A3-B3


    表格源码

    <table border="1">
    <tbody>
    <tr><th>Heading</th><th>Another Heading</th></tr>
    <tr>
    <td>row 1, cell 1</td>
    <td>row 1, cell 2</td>
    </tr>
    <tr>
    <td>row 2, cell 1</td>
    <td>row 2, cell 2</td>
    </tr>
    </tbody>
    </table>
    <h4>背景颜色:</h4>
    <table border="1" bgcolor="red">
    <tbody>
    <tr>
    <td>First</td>
    <td>Row</td>
    </tr>
    <tr>
    <td>Second</td>
    <td>Row</td>
    </tr>
    </tbody>
    </table>
    <h4>背景图像:</h4>
    <table border="1">
    <tbody>
    <tr>
    <td>First</td>
    <td>Row</td>
    </tr>
    <tr>
    <td>Second</td>
    <td>Row</td>
    </tr>
    </tbody>
    </table>
    <h4>这个表格没有边框:</h4>
    <table>
    <tbody>
    <tr>
    <td>100</td>
    <td>200</td>
    <td>300</td>
    </tr>
    <tr>
    <td>400</td>
    <td>500</td>
    <td>600</td>
    </tr>
    </tbody>
    </table>
    <h4>这个表格也没有边框:</h4>
    <table border="0">
    <tbody>
    <tr>
    <td>100</td>
    <td>200</td>
    <td>300</td>
    </tr>
    <tr>
    <td>400</td>
    <td>500</td>
    <td>600</td>
    </tr>
    </tbody>
    </table>
    <h4>横跨两列的单元格:</h4>
    <table border="1">
    <tbody>
    <tr><th>姓名</th><th colspan="2">电话</th></tr>
    <tr>
    <td>Bill Gates</td>
    <td>555 77 854</td>
    <td>555 77 855</td>
    </tr>
    </tbody>
    </table>
    <h4>横跨两行的单元格:</h4>
    <table border="1">
    <tbody>
    <tr><th>姓名</th>
    <td>Bill Gates</td>
    </tr>
    <tr><th rowspan="2">电话</th>
    <td>555 77 854</td>
    </tr>
    <tr>
    <td>555 77 855</td>
    </tr>
    </tbody>
    </table>
    <table style=" 250px;" border="4" align="center"><caption>【表格举例】</caption>
    <tbody>
    <tr bgcolor="#cccccc"><th>&nbsp;</th><th>列-A</th><th>列-B</th><th>列-C</th>
     </tr>
    <tr align="center">
    <td>行-1</td>
    <td>A1</td>
    <td>B1</td>
    <td rowspan="2">C1-C2</td>
    
     </tr>
    <tr align="center">
    <td>行-2</td>
    <td>A2</td>
    <td>B2</td>
    
     </tr>
    <tr align="center">
    <td>行-3</td>
    <td>A3</td>
    <td colspan="2">A3-B3</td>
    
     </tr>
    
    </tbody>
    </table>
  • 相关阅读:
    <原创>engine中地块的自动编号函数
    <原创>获取窗口上RadioButton的Tag值
    <原创>SQLServer一个高效的存储过程
    ArcEngine中放大、缩小、移动等功能实现的方法
    sublime No packages available for installation
    特殊字符,英文,中文排序
    关于 js中replace 特殊符号 ‘.’ 的问题
    12.3日电话面试
    electron 打包后node_modules 体积过于庞大
    git 本地同步分支数,删除远程已经删除掉的多余分支
  • 原文地址:https://www.cnblogs.com/endv/p/6217469.html
Copyright © 2011-2022 走看看