得用DIV 绝对定位,结全CSS控制字符是否打印,以下是我以前做的一个例子:
<title> 打印工单 </title>
<style media= "print ">
.noPrint { display: none ;font-size:9pt;line-height:120%;font-family:宋体}
</style>
<style media= "screen ">
.print { display: ;font-size:9pt;line-height:100%;font-family:宋体}
</style>
<style type= "text/css ">
body{font-size:9pt;color:#010101;line-height:120%}
.STYLE1 {font-weight: bold}
.STYLE2 {
color: #FF0000;
font-weight: bold;
}
</style>
<table width= "100% " height= "100% " border= "0 " cellpadding= "0 " cellspacing= "0 " class= "noPrint ">
<tr>
<td width= "35% " height= "18 " class= "noPrint "> <span class= "STYLE1 "> 客户送修资料: </span> <span class= "STYLE2 "> (* 号 为 必 填 项 目 ) </span> </td>
<td width= "40% " class= "noPrint "> </td>
<td width= "25% " class= "noPrint " > 0017354 </td>
</tr>
</table>
css div 实现套打
最新推荐文章于 2021-06-17 22:16:23 发布