小编Wae*_*hal的帖子

window.print()在IE\Firefox中没有显示相同的打印屏幕HTML

当我在我的打印屏幕上调用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)

html javascript css firefox internet-explorer

6
推荐指数
1
解决办法
343
查看次数

标签 统计

css ×1

firefox ×1

html ×1

internet-explorer ×1

javascript ×1