Bootstrap table表格簡單實例分享給大家,供大家參考,具體內容如下
使用類 Class="table" 既可讓table美化樣式
table 相關的Class
隔行換色 : table-striped
鼠標懸停效果: table-hover
表格的邊框:table-bordered
表頭顏色:class="danger" Success 等幾種顏色
1.頁面添加引用
<script src="../Bootstrap/jquery-3.1.1.js"></script> <script src="../Bootstrap/js/bootstrap.min.js"></script> <link href="../Bootstrap/css/bootstrap.min.css" rel="external nofollow" rel="stylesheet" />
2. 代碼實現
<table class="table table-striped table-hover table-bordered"> <thead> <tr class="danger"> <%--表頭顏色--%> <td>姓名</td> <td>年齡</td> <td>性別</td> </tr> </thead> <tbody> <tr> <td>張三</td> <td>20</td> <td>男</td> </tr> </tbody> </table>
3.頁面效果
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持武林網。
新聞熱點
疑難解答