比较不错的打印效果 css

2022-04-15 0 961

<html>

<head>

<title>看看</title>

<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″>

<!–media=print 这个属性可以在打印时有效–>

<style media=print>

.Noprint{display:none;}

.PageNext{page-break-after: always;}

</style>

<style>

.tdp

{

border-bottom: 1 solid #000000;

border-left: 1 solid #000000;

border-right: 0 solid #ffffff;

border-top: 0 solid #ffffff;

}

.tabp

{

border-color: #000000 #000000 #000000 #000000;

border-style: solid;

border-top-width: 2px;

border-right-width: 2px;

border-bottom-width: 1px;

border-left-width: 1px;

}

.NOPRINT {

font-family: “宋体”;

font-size: 9pt;

}

</style>

</head>

<body >

<center class=”Noprint” >

<p>

<OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0>

</OBJECT>

<input type=button value=打印 onclick=document.all.WebBrowser.ExecWB(6,1)>

<input type=button value=直接打印 onclick=document.all.WebBrowser.ExecWB(6,6)>

<input type=button value=页面设置 onclick=document.all.WebBrowser.ExecWB(8,1)>

</p>

<p> <input type=button value=打印预览 onclick=document.all.WebBrowser.ExecWB(7,1)>

<br/>

</p>

<hr align=”center” width=”90%” size=”1″ noshade>

</center>

<table width=”90%” border=”0″ align=”center” cellpadding=”2″ cellspacing=”0″ class=”tabp”>

<tr>

<td colspan=”3″ class=”tdp”>第1页</td>

</tr>

<tr>

<td width=”29%” class=”tdp”> </td>

<td width=”28%” class=”tdp”> </td>

<td width=”43%” class=”tdp”> </td>

</tr>

<tr>

<td colspan=”3″ class=”tdp”> </td>

</tr>

<tr>

<td colspan=”3″ class=”tdp”><table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″>

<tr>

<td width=”50%” class=”tdp”><p>这样的报表</p>

<p>对一般的要求就够了。</p></td>

<td> </td>

</tr>

</table></td>

</tr>

</table>

<hr align=”center” width=”90%” size=”1″ noshade class=”NOPRINT” >

<!–分页–>

<div class=”PageNext”></div>

<table width=”90%” border=”0″ align=”center” cellpadding=”2″ cellspacing=”0″ class=”tabp”>

<tr>

<td class=”tdp”>第2页</td>

</tr>

<tr>

<td class=”tdp”>看到分页了吧</td>

</tr>

<tr>

<td class=”tdp”> </td>

</tr>

<tr>

<td class=”tdp”> </td>

</tr>

<tr>

<td class=”tdp”><table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″>

<tr>

<td width=”50%” class=”tdp”><p>这样的报表</p>

<p>对一般的要求就够了。</p></td>

<td> </td>

</tr>

</table></td>

</tr>

</table>

</body>

</html>

免责声明:
1、本网站所有发布的源码、软件和资料均为收集各大资源网站整理而来;仅限用于学习和研究目的,您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。 不得使用于非法商业用途,不得违反国家法律。否则后果自负!

2、本站信息来自网络,版权争议与本站无关。一切关于该资源商业行为与www.niceym.com无关。
如果您喜欢该程序,请支持正版源码、软件,购买注册,得到更好的正版服务。
如有侵犯你版权的,请邮件与我们联系处理(邮箱:skknet@qq.com),本站将立即改正。

NICE源码网 CSS/HTML 比较不错的打印效果 css https://www.niceym.com/13418.html