在IE8和IE11中观察到相同HTML文件的不同输出

在IE8和IE11中观察到相同HTML文件的不同输出,html,internet-explorer-8,internet-explorer-11,Html,Internet Explorer 8,Internet Explorer 11,当我在ie8和ie11中打开下面的html代码时,输出是不同的 <div style="left: 0; top: 0; color: EAE6F1; z-index: 5; position: hidden; " id="Screen147"> <img style="left: 0; top: 2; z-index: 2; position: absolute; width: 1280; height: 1020; " id="item1" src="Desert.jp

当我在ie8和ie11中打开下面的html代码时,输出是不同的

<div style="left: 0; top: 0; color: EAE6F1; z-index: 5; position: hidden; " id="Screen147">


<img style="left: 0; top: 2; z-index: 2; position: absolute; width: 1280; height: 1020; " id="item1" src="Desert.jpg" border="0"/>

<div style="left: 608; top: 563; background-color: FFFFFF; color: 000000; z-index: 2; position: absolute; font-family:  'Arial'; font-size: 31px; layout-grid: both fixed 51px 32px; white-space: nowrap; " id="item2">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</div>

<div style="left: 608; top: 614; background-color: FFFFFF; color: 000000; z-index: 3; position: absolute; font-family:  'Arial'; font-size: 31px; layout-grid: both fixed 51px 32px; white-space: nowrap; " id="item3">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</div>

<div style="left: 608; top: 665; background-color: FFFFFF; color: 000000; z-index: 4; position: absolute; font-family:  'Arial'; font-size: 31px; layout-grid: both fixed 51px 32px; white-space: nowrap; " id="item4">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</div>

我想在图像中显示一个白色块。 但是当在IE8中运行时,与在IE11中显示时相比,白色块显得更大。 想要附上图片,但缺乏声誉

我想知道为什么会出现这种行为,如果代码相同,那么输出也应该相同。有人能帮我理解这种行为吗


非常感谢您的回复。

您的HTML输出取决于您的浏览器版本。HTML5和CSS3的许多功能在一些旧浏览器中不受支持。看看一些著名浏览器支持的功能



我不认为使用字体和(不间断的)空格来测量/设置某物的大小是最好的方法。
也就是说,您应该使用/properties和


另请看。

谢谢您的回复,但在我的例子中,IE8和IE11都支持它,但我得到的区别在于两个白色框的大小。你能提出它与众不同的原因吗?