IE当网站位于networkdrive时不正确地呈现CSS [英] IE not rendering CSS properly when the site is located at networkdrive

查看:144
本文介绍了IE当网站位于networkdrive时不正确地呈现CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个奇怪的问题,我们遇到了我的朋友。我们找到我们的网站在网络驱动器,并试图从那里打开它。所有其他浏览器渲染这个页面只是正常,但IE(btw,为什么它总是IE?))不能理解inline-block语句。但如果我把我们的文件复制到我的本地驱动器没有问题,IE渲染一切就像其他浏览器。
我用IE7-9b测试这个。

This is kinda weird problem we came across with my friend. We located our site at network drive and tried to open it from there. All other browsers render this page just fine but IE (btw. why it's always IE? :) ) can't understand inline-block statement. But if I copy our file to my local drive there is no problem, IE renders everything just like other browsers. I tested this with IE7-9b.

推荐答案

这听起来像是问题 - IE根据网页位置切换呈现模式。

This sounds like that problem - where IE switches rendering modes depending on where the page is located.

这是疯了。

查看此答案

http://127.0.0.1/mysite/mypage.php  <-- IE8 by default (updated!)
http://localhost/mysite/mypage.php  <-- IE8 by default (updated!)
http://machinename/mysite/mypage.php  <-- IE7 by default
http://192.168.100.x/mysite/mypage.php  <-- IE7 by default
http://google.com/  <-- IE8 by default

因为您通过网络驱动器访问您的网站,IE将进入IE7模式,并且IE7不能正确支持 inline-block ,因此您的网站无法正确呈现

So, because you're accessing your site via "network drive", IE is going into IE7 mode, and IE7 does not support inline-block properly, hence your site does not render properly.

您可以通过将此页添加到您的页面来请求IE8以IE8模式呈现您的网页:

You can request IE8 to render your page in IE8 mode by adding this to your page:

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

或者,要求IE8使用最新版本的渲染引擎应使用此:

Or, to request IE8 to use the most recent version of it's rendering engine (think IE9), you should use this:

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

或者,使用 Chrome Frame ,如果可用:

Or, to use Chrome Frame instead if it's available:

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

这篇关于IE当网站位于networkdrive时不正确地呈现CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆