使用 Bootstrap 向特定的表格行或單元格指示成功操作


若要使用 Bootstrap 向特定的表格行或單元格指示成功操作,請使用 .success 類。可以嘗試執行以下程式碼來實現 .success 類 −

示例

線上示例

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Table</title>
      <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
      <script src = "/scripts/jquery.min.js"></script>
      <script src = "/bootstrap/js/bootstrap.min.js"></script>
   </head>
   <body>
      <div class = "table-responsive">
         <table class = "table">
            <thead>
               <tr>
                  <th>Subject</th>
                  <th>Marks</th>
                  <th>Type</th>
               </tr>
            </thead>
            <tbody>
               <tr>
                  <td>C</td>
                  <td>65</td>
                  <td>Programming Language</td>
               </tr>
               <tr class = "success">
                  <td>PHP</td>
                  <td>92</td>
                  <td>Scripting Language</td>
               </tr>
               <tr>
                  <td>jQuery</td>
                  <td>80</td>
                  <td>JavaScript Library</td>
               </tr>
            </tbody>
         </table>
      </div>
   </body>
</html>

更新於: 2020 年 6 月 12 日

98 次瀏覽

開啟您的 職業生涯

完成課程獲得認證

開始
廣告
© . All rights reserved.