CSS 几乎所有的引导样式在 IE8 中都不起作用。在 chrome 和 firefox 中工作正常
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14092825/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Almost all of bootstrap styling not working in IE8. Works fine in chrome and firefox
提问by asprotte
I'm working on a classic .asp site and am using bootstrap for styling. Everything is working fine in chrome and firefox, but almost all of the styling is missing in IE8.
我正在一个经典的 .asp 站点上工作,并且正在使用引导程序进行样式设置。在 chrome 和 firefox 中一切正常,但在 IE8 中几乎所有样式都丢失了。
I'm using bootstraps carousel and modal and none of them are looking like they should. The carousel is just rendered as a series of images and none of the back/forward buttons are working.
我正在使用 bootstraps carousel 和 modal,但没有一个看起来像他们应该的。轮播只是呈现为一系列图像,没有任何后退/前进按钮工作。
The modal isn't styled at all, and is just inserted on the page as a "box" with a border" (no backdrop, rounded corners or anything).
模态根本没有样式,只是作为带边框的“框”插入页面上(没有背景、圆角或任何东西)。
I've tried a few more of the bootstrap library styles, such as tables and buttons and nothing looks like it should. I know that the bootstrap.css gets included as some of the styling works (e.g button colors). The bootstrap js works fine.
我已经尝试了更多的引导程序库样式,例如表格和按钮,但看起来没有任何效果。我知道 bootstrap.css 作为一些样式作品(例如按钮颜色)被包含在内。引导 js 工作正常。
Is there anything additionally that I need to add to my html docs (doc types or what not) to make bootstrap work as it should in IE?
还有什么我需要添加到我的 html 文档(文档类型或其他类型)以使引导程序在 IE 中正常工作的吗?
I'm using bootstrap v2.2.2
我正在使用引导程序 v2.2.2
Thanks in advance!
提前致谢!
采纳答案by asprotte
Ok, so I figured it out. Wow this is really stupid. Apparently I was running IE in quirks mode.. This is what happens when you let a mac guy mess around in windows. Anyway, thanks for the feedback.
好的,所以我想通了。哇这真的很愚蠢。显然我在 quirks 模式下运行 IE.. 当你让一个 mac 家伙在 windows 中乱搞时会发生这种情况。无论如何,感谢您的反馈。
回答by Sidney Gijzen
There's some HTML5 shim excerpt (see below) necessary to support the HTML5 doctype in IE8 and lower. Did you check if it's still in the pages you built?
在 IE8 及更低版本中支持 HTML5 doctype 需要一些 HTML5 shim 摘录(见下文)。您是否检查过它是否仍在您构建的页面中?
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->