有没有办法用元标记进行 If IE8 检查?
或者也许是javascript? 我有一个在 ie7 + 现代浏览器中运行良好的布局。但ie8不行。
我发现我可以使用这个:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
并且 IE8 假装是 IE7,并正确渲染所有内容,但随后它会弄乱所有好的浏览器(基于 webkit、基于 gecko 等)。
我知道在正文中,您可以执行以下操作:
<!--[if IE 8]>
ie8 specific javascript, html, or css
<![endif]-->
但我在元标记周围的 中尝试过这样做,但它不起作用
or maybe javascript?
I have a layout that works well in ie7 + modern browsers. But not ie8.
I found out that I can use this:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
and IE8 pretends to be IE7, and renders everything correctly, but then it messes up all the good browsers (webkit-based, gecko-based, etc).
I know that in the body, you can do things like:
<!--[if IE 8]>
ie8 specific javascript, html, or css
<![endif]-->
But I tried that in the <head>
around the meta tag, but it didn't work
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现,由于我在 Rails 上使用 ruby,我只需询问请求变量浏览器要求获取页面即可。
I found out that since I'm using ruby on rails, I can just ask the request variable what browser asked to get the page.