中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

使用Bootstrap怎么合并表格單元格

發布時間:2021-04-09 16:07:52 來源:億速云 閱讀:326 作者:Leah 欄目:web開發

本篇文章給大家分享的是有關使用Bootstrap怎么合并表格單元格,小編覺得挺實用的,因此分享給大家學習,希望大家閱讀完這篇文章后可以有所收獲,話不多說,跟著小編一起來看看吧。

1、問題背景

利用Bootstrap設計表格,并且表格需要合并單元格

2、實現源碼

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Bootstrap-表格合并單元格</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.css" rel="external nofollow" />
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.js" ></script>
    <style>
      body,html{
        width: 99%;
        height: 98%;
        font-family: "微軟雅黑";
        font-size: 14px;
      }
      table{
        width: 100%;
      }
    </style>
    <script>
    </script>
  </head>
  <body>
    <div class="row">
      <div class="col-xs-12">
        <table class="table table-striped">
          <tr>
            <td>
              <label for="stuNo">學號:</label>
              <input type="text" id="stuNo" />
              <div class="btn-group" >
                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" >
                  班級
                </button>
                <ul class="dropdown-menu" role="menu">
                 <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >一班</a></li>
                 <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >二班</a></li>
                 <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >三班</a></li>
                 <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >四班</a></li>
                 <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >五班</a></li>
                </ul>
              </div>
              <button type="button" class="btn btn-primary">查詢</button>
              <button type="button" class="btn">重置</button>
            </td>
          </tr>
        </table>
      </div>
      <div class="col-xs-12">
        <div class="col-xs-2">
          <table class="table table-striped table-bordered">
            <caption>學生表</caption>
            <thead>
              <tr>
                <th>學生</th>
                <th>學號</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>胡思</td>
                <td>2016010101</td>
              </tr>
              <tr>
                <td>趙四</td>
                <td>2016010102</td>
              </tr>
              <tr>
                <td>陳誠</td>
                <td>2016010103</td>
              </tr>
              <tr>
                <td>李磊</td>
                <td>2016010104</td>
              </tr>
              <tr>
                <td>孫楊</td>
                <td>2016010105</td>
              </tr>
              <tr>
                <td>李爽</td>
                <td>2016010106</td>
              </tr>
            </tbody>
          </table>
          <table class="table table-striped table-bordered">
            <caption>學生表</caption>
            <thead>
              <tr>
                <th>學生</th>
                <th>學號</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>胡思</td>
                <td>2016010101</td>
              </tr>
              <tr>
                <td>趙四</td>
                <td>2016010102</td>
              </tr>
              <tr>
                <td>陳誠</td>
                <td>2016010103</td>
              </tr>
              <tr>
                <td>李磊</td>
                <td>2016010104</td>
              </tr>
              <tr>
                <td>游豪</td>
                <td>2016010105</td>
              </tr>
            </tbody>
          </table>
        </div>
        <div class="col-xs-10">
          <table class="table table-striped">
            <tr >
              <td>到校</td>
              <td>回家</td>
              <td>距離</td>
            </tr>
            <tr >
              <td colspan="2" >222</td>
              <td rowspan="2" >
                <div class="col-xs-12">
                  <table class="table table-striped table-bordered">
                    <thead>
                      <tr>
                        <th>姓名</th>
                        <th>學號</th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr>
                        <td>胡思</td>
                        <td>2016010101</td>
                      </tr>
                    </tbody>
                  </table>
                </div>
              </td>
            </tr>
            <tr>
              <td colspan="2" >333</td>
            </tr>
          </table>
          <table class="table table-striped">
            <tr >
              <td>到校</td>
              <td>回家</td>
              <td>距離</td>
            </tr>
            <tr >
              <td colspan="2" >222</td>
              <td rowspan="2" >
                <div class="col-xs-12">
                  <table class="table table-striped table-bordered">
                    <thead>
                      <tr>
                        <th>姓名</th>
                        <th>學號</th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr>
                        <td>胡思</td>
                        <td>2016010101</td>
                      </tr>
                    </tbody>
                  </table>
                </div>
              </td>
            </tr>
            <tr>
              <td colspan="2" >333</td>
            </tr>
          </table>
          <table class="table table-striped">
            <tr >
              <td>到校</td>
              <td>回家</td>
              <td>距離</td>
            </tr>
            <tr >
              <td colspan="2" >222</td>
              <td rowspan="2" >
                <div class="col-xs-12">
                  <table class="table table-striped table-bordered">
                    <thead>
                      <tr>
                        <th>姓名</th>
                        <th>學號</th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr>
                        <td>胡思</td>
                        <td>2016010101</td>
                      </tr>
                    </tbody>
                  </table>
                </div>
              </td>
            </tr>
            <tr>
              <td colspan="2" >333</td>
            </tr>
          </table>
          <table class="table table-striped">
            <tr >
              <td>到校</td>
              <td>回家</td>
              <td>距離</td>
            </tr>
            <tr >
              <td colspan="2" >222</td>
              <td rowspan="2" >
                <div class="col-xs-12">
                  <table class="table table-striped table-bordered">
                    <thead>
                      <tr>
                        <th>姓名</th>
                        <th>學號</th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr>
                        <td>胡思</td>
                        <td>2016010101</td>
                      </tr>
                    </tbody>
                  </table>
                </div>
              </td>
            </tr>
            <tr>
              <td colspan="2" >333</td>
            </tr>
          </table>
        </div>
      </div>
    </div>
  </body>
</html>

以上就是使用Bootstrap怎么合并表格單元格,小編相信有部分知識點可能是我們日常工作會見到或用到的。希望你能通過這篇文章學到更多知識。更多詳情敬請關注億速云行業資訊頻道。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

琼海市| 财经| 罗江县| 阳春市| 合江县| 张北县| 东台市| 奉化市| 唐海县| 淅川县| 青田县| 石嘴山市| 白水县| 清流县| 德清县| 旬邑县| 桑植县| 镇安县| 伊川县| 广南县| 盐池县| 清河县| 额济纳旗| 台山市| 汝州市| 太仓市| 溧阳市| 观塘区| 和平区| 手游| 海伦市| 来安县| 东光县| 镇坪县| 滦平县| 筠连县| 天柱县| 玉山县| 丘北县| 北安市| 社旗县|