前端:table、thead、th、tr、td


table:表格;thead:表頭;tr:行;td:單元格;th:一行的首個單元格

tbody包含行的內容下載完優先顯示,不必等待表格結束.另外,還需要注意一個地方。表格行本來是從上向下顯示的。但是,應用了thead/tbody/tfoot以后,就"從頭到腳"顯示,不管你的行代碼順序如何。也就是說如果thead寫在了tbody的后面,html顯示時,還是以先thead后tbody顯示。

<table> 
    <thead> 
        <tr> 
        <th>這是在thead->tr->th里面</th> 
            <td>這是在thead->tr->td里面</td> 
        </tr> 
    </thead> 
    <tbody> 
        <tr> 
            <th>這是在thead->tr->th里面</th> 
            <td>這是在thead->tr->td里面</td> 
        </tr> 
    </tbody> 
    <tfoot> 
        <tr> 
            <th>這是在thead->tr->th里面</th> 
            <td>這是在thead->tr->td里面</td> 
        </tr> 
    </tfoot> 
</table> 
<table>
 <thead>
     <tr>
     <th>這是在thead->tr->th里面</th>
            <td>這是在thead->tr->td里面</td>
        </tr>
    </thead>
    <tbody>
     <tr>
      <th>這是在thead->tr->th里面</th>
            <td>這是在thead->tr->td里面</td>
        </tr>
    </tbody>
    <tfoot>
     <tr>
      <th>這是在thead->tr->th里面</th>
            <td>這是在thead->tr->td里面</td>
        </tr>
    </tfoot>
</table>

  

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM