当我在我的打印屏幕上调用window.print()时,打印预览在Chrome中看起来非常好,但在IE\Firefox中,一些元素发生了变化,如下图所示
原始HTML:
FireFox打印预览
我有一个特定的CSS用于此打印屏幕页面(见下文),它适用于chrome但不适用于其他人
/** The wrapping tag for the renderer instant. Do not specify font-size,
it is rendered dynamically from the server size since it is determining
the positions of each tag. **/
BODY
{
BACKGROUND-COLOR: white;
color:black;
margin: 0px;
}
/* the instant wrapping tag */
#gx_screenArea
{
position:relative;
font-family: "Lucida Console", Monaco, monospace;
height:0px; /* make scrolling when needed*/
margin: 0px;
color: black;
}
/* input fields inside the instant wrapping tag */
#gx_screenArea input,
#gx_screenArea select …Run Code Online (Sandbox Code Playgroud)