Bootstrap-表格合并单元格

Bootstrap-表格合并单元格,第1张

概述1、问题背景 利用Bootstrap设计表格,并且表格需要合并单元格2、实现源码&lt!DOCTYPE html&gt&lthtml&gt&lthead&gt&ltmeta charset="utf-8"&gt &ltmeta http-equiv="X-UA-Compatible" content="IE=edge"&gt

1、问题背景

     利用bootstrap设计表格,并且表格需要合并单元格


2、实现源码

<!DOCTYPE HTML><HTML> <head> <Meta charset="utf⑻"> <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=""> <link rel="icon" href="Js/bootstrap⑶.3.5/docs/favicon.ico"> <Title>bootstrap-表格合并单元格</Title> <link rel="stylesheet" href="Js/bootstrap⑶.3.5/dist/CSS/bootstrap.CSS" /> <script type="text/JavaScript" src="Js/jquery⑴.12.4.Js" ></script> <script type="text/JavaScript" src="Js/bootstrap⑶.3.5/dist/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⑴2"> <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="#">1班</a></li> <li><a href="#">2班</a></li> <li><a href="#">3班</a></li> <li><a href="#">4班</a></li> <li><a href="#">5班</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⑴2"> <div class="col-xs⑵"> <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>赵4</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>赵4</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⑴0"> <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⑴2"> <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⑴2"> <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⑴2"> <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⑴2"> <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、实现结果


总结

以上是内存溢出为你收集整理的Bootstrap-表格合并单元格全部内容,希望文章能够帮你解决Bootstrap-表格合并单元格所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1016636.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存