table 合并单元格

廉价感情. 提交于 2019-12-20 01:55:44
colspan 和rolspan,注意:rolspan和colspan同时存在之时,rolspan设置之后,table中第一个<tr>与之后的<tr>有点儿小区别<html>
<head>
    <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
</head>
<style>
    body {
        margin:0;
        padding:20px;
        font-size:16px;
        font-family: 微软雅黑;
    }
    .text-body {
        margin-left: 28px;
        margin-top: 10px;
        line-height: 25px;
        font-size:16px;
        font-family: 微软雅黑;
    }

    p,
    table, caption, td, tr, th {
        margin:0;
        padding:0;
        font-weight:normal;
        font-family: 'Microsoft Yahei';
    }
    p {
        margin-bottom:15px;
    }
    table {
        border-collapse:collapse;
        margin-bottom:15px;
    }
    table td,
    table th {
        padding:5px;
        padding-left:15px;
        padding-right:15px;
        border:1px solid #bbb;
    }
    thead th {
        background:#436EEE;
        color:#fff;
        font-size:16px;
        white-space:nowrap;
    }
    thead th[colspan],
    thead th[rowspan] {
        background:#436EEE;
    }<html>
      <head>
      <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
    </head>
      <style>
      body {
          margin:0;
          padding:20px;
          font-size:16px;
          font-family: 微软雅黑;
      }
    .text-body {
        margin-left: 28px;
        margin-top: 10px;
        line-height: 25px;
        font-size:16px;
        font-family: 微软雅黑;
    }

    p,
    table, caption, td, tr, th {
        margin:0;
        padding:0;
        font-weight:normal;
        font-family: 'Microsoft Yahei';
    }
    p {
        margin-bottom:15px;
    }
    table {
        border-collapse:collapse;
        margin-bottom:15px;
    }
    table td,
    table th {
        padding:5px;
        padding-left:15px;
        padding-right:15px;
        border:1px solid #bbb;
    }
    thead th {
        background:#436EEE;
        color:#fff;
        font-size:16px;
        white-space:nowrap;
    }
    thead th[colspan],
    thead th[rowspan] {
        background:#436EEE;
    }
</style>
<div class='text-body'>********</div>
<div class='text-body'><div>*********</div>
    <div align='left'>
        <table class='bordered' style='table-layout:fixed;'>
            <thead>
            <tr>
                <th style='width:35%'>****</th>
                <th colspan='2' style='width:35%'>****</th>
            </tr>
            </thead>
            <tbody>
            <tr >
                <td rowspan="84">13007103</td>
                <td> Root.srvTime</td>
                <td>98.53%</td>
            </tr><tr >
                <td>Root.segs[x].orgFltInfo.seq[x].basicInfo.airUrl</td>
                <td>95.59%</td>
            </tr><tr >
                <td> Root.segList[x].seqs[x].flight.basic.alUrl</td>
                <td>95.59%</td>
            </tr><tr >
                <td> Root.segList[x].seqs[x].passengers</td>
                <td>95.59%</td>
            </tr><tr >
                <td> Root.passengers[x].cType</td>
                <td>95.59%</td>
            </tr><tr >
                <td> Root.passengers[x].cTypeName</td>
                <td>95.59%</td>
            </tr><tr >
                <td> Root.passengers[x].sInfo</td>
                <td>95.59%</td>
            </tr><tr >
                <td> Root.passengers[x].tNo</td>
                <td>95.59%</td>
            </tr><tr >
                <td> Root.passengers[x].ageTypeName</td>
                <td>95.59%</td>
            </tr><tr >
                <td> Root.passengers[x].birthday</td>
                <td>95.59%</td>
            </tr><tr >
                <td> Root.passengers[x].gName</td>
                <td>95.59%</td>
            </tr><tr >
                <td> Root.extend</td>
                <td>95.59%</td>
            </tr><tr >
                <td> Root.selfSrv[x]</td>
                <td>82.35%</td>
            </tr><tr >
                <td> Root.segList[x].seqs[x].pStates</td>
                <td>79.41%</td>
            </tr><tr >
                <td> Root.selfSrv[x].action.type</td>
                <td>77.94%</td>
            </tr><tr >
                <td> Root.selfSrv[x].pos</td>
                <td>77.94%</td>
            </tr><tr >
                <td> Root.selfSrv[x].action.url</td>
                <td>73.53%</td>
            </tr><tr >
                <td> Root.selfSrv[x].action.jumpTarget</td>
                <td>72.06%</td>
            </tr><tr >
                <td> Root.payDetail[x].grp[x].url</td>
                <td>64.71%</td>
            </tr><tr >
                <td> Root.banLst[x].action.url</td>
                <td>58.82%</td>
            </tr><tr >
                <td> Root.selfSrv[x].action.prompt</td>
                <td>55.88%</td>
            </tr><tr >
                <td> Root.banLst[x]</td>
                <td>51.47%</td>
            </tr><tr >
                <td> Root.selfSrv[x].type</td>
                <td>33.82%</td>
            </tr><tr >
                <td> Root.selfSrv[x].title</td>
                <td>33.82%</td>
            </tr><tr >
                <td> Root.selfSrv[x].icon</td>
                <td>33.82%</td>
            </tr><tr >
                <td> Root.selfSrv[x].group</td>
                <td>30.88%</td>
            </tr><tr >
                <td> Root.segs[x].orgFltInfo.seq[x].basicInfo.airUrl</td>
                <td>29.41%</td>
            </tr><tr >
                <td> Root.selfSrv[x].remark</td>
                <td>22.06%</td>
            </tr><tr >
                <td> Root.segList[x].basic.isODay</td>
                <td>19.12%</td>
            </tr><tr >
                <td> Root.segList[x].seqs[x].flight.arrive.isODay</td>
                <td>19.12%</td>
            </tr><tr >
                <td> Root.selfSrv[x].stsCode</td>
                <td>16.18%</td>
            </tr><tr >
                <td> Root.segList[x].states[x]</td>
                <td>16.18%</td>
            </tr><tr >
                <td> Root.segs[x].orgFltInfo.seq[x].basicInfo.cfInfo.airUrl</td>
                <td>13.24%</td>
            </tr><tr >
                <td> Root.segList[x].seqs[x].flight.basic.carrier.airUrl</td>
                <td>13.24%</td>
            </tr><tr >
                <td> Root.rrpList[x]</td>
                <td>11.76%</td>
            </tr><tr >
                <td> Root.freeProduct</td>
                <td>7.35%</td>
            </tr><tr >
                <td> Root.abt</td>
                <td>7.35%</td>
            </tr><tr >
                <td> Root.payDetail[x].grp[x].cate</td>
                <td>5.88%</td>
            </tr><tr >
                <td> Root.payDetail[x].grp[x].name</td>
                <td>5.88%</td>
            </tr><tr >
                <td> Root.payDetail[x].grp[x].uPrc</td>
                <td>5.88%</td>
            </tr><tr >
                <td> Root.payDetail[x].grp[x].cnt</td>
                <td>5.88%</td>
            </tr><tr >
                <td> Root.payDetail[x].grp[x]</td>
                <td>5.88%</td>
            </tr><tr >
                <td> Root.rrpList[x].dList[x].tit</td>
                <td>4.41%</td>
            </tr><tr >
                <td> Root.rrpList[x].dList[x].fList[x].type</td>
                <td>4.41%</td>
            </tr><tr >
                <td> Root.rrpList[x].dList[x].fList[x].tit</td>
                <td>4.41%</td>
            </tr><tr >
                <td> Root.rrpList[x].dList[x].fList[x].sList[x].tList[x].tit</td>
                <td>4.41%</td>
            </tr><tr >
                <td> Root.rrpList[x].dList[x].fList[x].sList[x].tList[x].sty</td>
                <td>4.41%</td>
            </tr><tr >
                <td> Root.rrpList[x].dList[x].fList[x].sList[x].tList[x].icon</td>
                <td>4.41%</td>
            </tr><tr >
                <td> Root.segs[x].chgList[x].pctFltInfo[x].basicInfo.airUrl</td>
                <td>4.41%</td>
            </tr><tr >
                <td> Root.passengers[x].ffps[x].name</td>
                <td>4.41%</td>
            </tr><tr >
                <td> Root.segList[x].states[x].title</td>
                <td>2.94%</td>
            </tr><tr >
                <td>Root.rc</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.errMsg</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.oBscInfo</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.segs</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.contactinfo</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.repayList</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.opriceinfo</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.Paymentlst</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.avUpCertList</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.notes</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.selfSrv</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.couponList</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.aValueList</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.xpdtlst</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.banLst</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.payDetail</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.fcWarning</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.recommBuyPop</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.notiBarList</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.rrpList</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.segList</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.configInfo</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.hotels</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.passengers</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.segList[x].basic.tags[x]</td>
                <td>2.94%</td>
            </tr><tr >
                <td> Root.banLst[x].action.type</td>
                <td>1.47%</td>
            </tr><tr >
                <td> Root.rrpList[x].dList[x].fList[x].sList[x].tList[x].desc</td>
                <td>1.47%</td>
            </tr><tr >
                <td> Root.rrpList[x].dList[x].fList[x].sList[x].tList[x]</td>
                <td>1.47%</td>
            </tr><tr >
                <td> Root.segList[x].states[x].stsName</td>
                <td>1.47%</td>
            </tr><tr >
                <td> Root.segList[x].states[x].csts</td>
                <td>1.47%</td>
            </tr><tr >
                <td> Root.subDetails.changes[x].oFlights[x].basic.alUrl</td>
                <td>1.47%</td>
            </tr><tr >
                <td> Root.subDetails.changes[x].newFlights[x].basic.alUrl</td>
                <td>1.47%</td>
            </tr><tr >
                <td> Root.rrpList[x].dList[x]</td>
                <td>1.47%</td>
            </tr>            </tbody>
        </table>
    </div>
</div>
</html>

效果:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!