Bootstrap 에서 실 현 된 표 병합 셀 예시

13272 단어 Bootstrap표.
이 사례 는 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" style="width: 157px; height: 26px;">
                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" style="width: 157px; height: 26px;">
                    
                </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 style="text-align: center;">
              <td>  </td>
              <td>  </td>
              <td>  </td>
            </tr>
            <tr style="text-align: center;">
              <td colspan="2" style="text-align: center;">222</td>
              <td rowspan="2" style="width: 200px;">
                <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" style="text-align: center;">333</td>
            </tr>
          </table>
          <table class="table table-striped">
            <tr style="text-align: center;">
              <td>  </td>
              <td>  </td>
              <td>  </td>
            </tr>
            <tr style="text-align: center;">
              <td colspan="2" style="text-align: center;">222</td>
              <td rowspan="2" style="width: 200px;">
                <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" style="text-align: center;">333</td>
            </tr>
          </table>
          <table class="table table-striped">
            <tr style="text-align: center;">
              <td>  </td>
              <td>  </td>
              <td>  </td>
            </tr>
            <tr style="text-align: center;">
              <td colspan="2" style="text-align: center;">222</td>
              <td rowspan="2" style="width: 200px;">
                <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" style="text-align: center;">333</td>
            </tr>
          </table>
          <table class="table table-striped">
            <tr style="text-align: center;">
              <td>  </td>
              <td>  </td>
              <td>  </td>
            </tr>
            <tr style="text-align: center;">
              <td colspan="2" style="text-align: center;">222</td>
              <td rowspan="2" style="width: 200px;">
                <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" style="text-align: center;">333</td>
            </tr>
          </table>
        </div>
      </div>
    </div>
  </body>
</html>

3.실현 결과

PS:boottstrap 레이아웃 에 대해 서 는 본 사이트 의 온라인 시각 화 레이아웃 도 구 를 추천 합 니 다.참고 하 시기 바 랍 니 다.
온라인 boottstrap 시각 화 레이아웃 편집 도구:
http://tools.jb51.net/aideddesign/layoutit
본 논문 에서 말 한 것 이 모두 가 boottstrap 을 바탕 으로 하 는 프로그램 디자인 에 도움 이 되 기 를 바 랍 니 다.

좋은 웹페이지 즐겨찾기