当站点位于 networkdrive 时,IE 无法正确呈现 CSS
这是我们和朋友遇到的一个奇怪的问题.我们将我们的网站定位在网络驱动器上,并试图从那里打开它.所有其他浏览器都可以很好地呈现此页面,但 IE(顺便说一句.为什么它总是 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 使用其渲染引擎的最新版本(想想 IE9),你应该使用这个:
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 框架(如果可用):
Or, to use Chrome Frame instead if it's available:
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
相关文章