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

    <table border="1">
        <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>
    </table>

    注意,输入是以行来显示的

    <td>是输入,<th>是标签,一般会加粗

    还有跨行

    <!DOCTYPE html>
    <html>
    <head> 
    <meta charset="utf-8"> 
    <title>菜鸟教程(runoob.com)</title> 
    </head>
    <body>
    
    <h4>单元格跨两格:</h4>
    <table border="1">
    <tr>
      <th>Name</th>
      <th colspan="2">Telephone</th>
    </tr>
    <tr>
      <td>Bill Gates</td>
      <td>555 77 854</td>
      <td>555 77 855</td>
    </tr>
    </table>
    
    <h4>单元格跨两列:</h4>
    <table border="1">
    <tr>
      <th>First Name:</th>
      <td>Bill Gates</td>
    </tr>
    <tr>
      <th rowspan="2">Telephone:</th>
      <td>555 77 854</td>
    </tr>
    <tr>
      <td>555 77 855</td>
    </tr>
    </table>
    
    </body>
    </html>

    横着跨,是colspan  竖着跨,是rowspan

    也可以格中格

    单元格边距:cellpadding       

    单元格间距:cellspacing

  • 相关阅读:
    sequence.c
     Link 
    转:MFC中屏蔽ESC和回车关闭对话框
    转:CWebBrowser2去除边框、滚动条、右键菜单
    VC:res协议——从模块中获取资源
    20131213
    20131212
    20131211
    20131205
    20131128
  • 原文地址:https://www.cnblogs.com/xudong97/p/9938991.html
Copyright © 2011-2022 走看看