关键点:先合并可合并的单元格要将定义的style样式放在td(单元格)中,不能放在tr(行)中否则表格线不能完全隐去(需要显示表格线的可将style样式放在tr中)
一、head中的部份样式示例(可根据左右上下边框的需要或单元格中字体的大小任意设置,table样式是关键不能更改)
<style type="text/css">
<!--
table {
border-collapse: collapse;
border-width: 0px;
}
table td {
empty-cells: show;
}
.style1 {
font-size: 14px;
font-weight: bold;
}
.style0 {
font-size: 16px;
font-weight: bold;
border-left: none;
border-right: none;
border-top: none;
}
.style2 {
font-size: 12px
}
-->
</style>
二、body中的表格示例(去掉了第一行的上左右表格线,table中border="1 cellpadding="0" 不更改能)
<div id="printcontent" align="center" class="dabiaoti">
<table width="95%" border="1" cellpadding="0" bordercolor="#00FF00"
cellspacing="0">
<tr>
<td height="35" colspan="12" class="style0" align="center">联合出借明细表</td>
</tr>
<tr>
<td width="126" height="30" colspan="12" class="style1">项目编号:${xiangmu.xiangmubianhao
}
</tr>
<tr class="style1">
<td width=50 " height="25" align="center">编号</td>
<td width="126" height="25" align="center">出借人</td>
<td width="126" height="25" align="center">结转项目</td>
<td height="25" align="center">转入金额</td>
<td height="25" align="center">建行</td>
<td height="25" align="center">邮政</td>
<td height="25" align="center">农行</td>
<td height="25" align="center">中行</td>
<td height="25" align="center">信用社</td>
<td height="25" align="center">中信</td>
<td height="25" align="center">工行</td>
<td width="92" height="25" align="center">合计</td>
</tr>
</div>