简体   繁体   English

VS2010 IE呈现不同

[英]VS2010 IE renders different

So, I have an application that I test on my VS2010 virtual ASP.NET server, when I open it in IE on my local environment, everything renders fine, but whenever I deploy it to the external server, it starts to screw stuff up in IE (CSS and some jQuery problems). 因此,我有一个要在VS2010虚拟ASP.NET服务器上测试的应用程序,当我在本地环境中的IE中打开它时,所有内容都可以正常显示,但是每当我将其部署到外部服务器时,它就会开始破坏IE(CSS和一些jQuery问题)。 I have the same code everywhere, how is it possible to be rendering it differently? 我到处都有相同的代码,如何才能以不同的方式呈现它? (I test them in the same IE version), everything works fine in other browsers. (我在相同的IE版本中对其进行了测试),在其他浏览器中一切正常。

It sounds like a compatibility-mode issue. 听起来像是兼容性模式问题。 In some cases, IE will jump into compatibility mode unexpectedly. 在某些情况下,IE会意外地跳入兼容模式。 This is often related to browser configuration. 这通常与浏览器配置有关。

Easiest way to preven this is to add the following meta tag to your HTML code: 防止这种情况的最简单方法是在HTML代码中添加以下meta标签:

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

This will force IE to always use the best available rendering engine, and prevent it jumping into compatibility mode, regardless of the browser config. 这将迫使IE始终使用最佳的可用渲染引擎,并且无论浏览器配置如何,都将阻止其跳入兼容模式。

Hope that helps. 希望能有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM