0
点赞
收藏
分享

微信扫一扫

-表格和表单

千行 2022-02-14 阅读 53
csshtmlcss3

一、表格

    colspan:规定单元格可横跨的列数。
    rowspan:规定单元格可横跨的行数。
     caption-side:top | bottom | inherit(表格标题定位在表格之上 | 表格标题定位在表格之下 | 继承父属性)
     table {
     border: 1px dotted red;
     border-collapse: collapse;
     }
    td,tr,th {
     border: 1px solid gray;
    }
        <table>
      <thead>
          <tr>
              <th>title</th>
             <th>title</th>
              <th>title</th>
          </tr>
      </thead>
      <tfoot>
          <tr>
              <th>footer</th>
             <th>footer</th>
              <th>footer</th>
          </tr>
      </tfoot>
      <tbody>
         <tr>
             <td>the</td>
             <td>testinglongstring</td>
             <td>Row</td>
         </tr>
         <tr>
             <td>Second</td>
             <td>-</td>
             <td>Row</td>
         </tr>
         <tr>
             <td colspan="2">the</td>
             <td>third</td>
             <td>Row</td>
         </tr>
     </tbody>
     </table>

二、表单

// 隐式
<label>email <input name="email" type="text"></label>

// 显式
<label for="email">email</label>
<input name="email"5 id="email" type="text">
     <form>
     <fieldset>
     <legend>健康信息</legend>
     身高:<input type="text" />
     体重:<input type="text" />
     </fieldset>
     </form>
    <button type="button">点击这里</button>
举报

相关推荐

0 条评论