我正在做一个项目,但在使用 IE7 时遇到了一些问题。
我有一个 iframe 占据整个页面并加载另一个页面。剪下来,它看起来像这样:
<html>
<head>
<title>Corporate Directory</title>
</head>
<body scroll="no" style="margin: 0;">
<iframe id="corpdir" height="100%" width="100%" frameborder="0" src="http://fullpath.to/corporate/directory" name="parent_frame">
</body>
</html>
转到http://fullpath.to/corporate/directory在 IE7 中效果很好,而且渲染完全没有问题。但是当它像上面那样加载到 iframe 中时,有些元素会被推到左边。所有这些元素都定义了“margin-left”,但它似乎被忽略了。并非所有带有左边距的元素都被推过,只有少数。我看不出他们有什么共同点,我可以想象会这样做。
(请不要问为什么我几乎被迫在全屏 iframe 中加载我们的 web 应用程序。请接受这是非常企业化的并继续前进。谢谢。)