【发布时间】:2013-12-23 22:14:51
【问题描述】:
我有执行报告打印的 Web 应用程序。 我的代码看起来像这样,并且可以正常工作。
HTML
<table>
<thead>
<tr>
<th>
Header part
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div id="reportView">
<div class="head centerPosition noPrint">
Report header
</div>
<div class="content" style="margin: 0px;">
<div id="report" style="margin-top: 10px;">
report content
</div>
</div>
<div class="foot noPrint">
Report footer
</div>
</div>
</td>
</tr>
</tbody>
</table>
CSS
<style media="print">
body
{
background-color:#FFFFFF;
margin: 0px; /* this affects the margin on the content before sending to printer */
width: 100%;
}
#site_header, #site_footer, .noPrint
{
visibility: hidden;
display: none;
height: 0px !important;
overflow: hidden !important;
}
#report .content
{
width: 100%; margin: 0px; float: none;
background: transparent;
}
#report {
background-color: white;
width: 100%;
}
</style>
在我打印任何报告后,报告会在纸上按比例缩小。 如果有人知道如何解决这个问题,请帮助我。我尝试在谷歌上搜索,但没有一个建议有效。
在此先感谢...
【问题讨论】:
-
必问问题:您是否不小心取消了缩放?
-
你有实时页面来测试吗?
-
此项目已上线,抱歉,不对外公开
标签: html internet-explorer css internet-explorer-10