IE9无法加载响应布局 [英] IE9 Fails to load responsive layout
问题描述
更新1:
这看起来只有当我建立并发布到IIS是一个问题。在Visual Studio中运行,没有任何问题。 IE9渲染正确。
This looks to be a problem only when I build and publish to IIS. Running in visual studio, there are no issues. IE9 renders correctly.
IE9坏了,我不知道该怎么做任何真正的测试。我的网站加载正确的IE8,10和11,Chrome浏览器,火狐和Opera,但不是IE9。
IE9 is broken, and I don't know how to do any real testing. My site loads correctly for IE8, 10, and 11, Chrome, Firefox, and Opera, but not IE9.
这是什么是应该看起来像(和它的外观在大多数浏览器):
This is what it is supposed to look like (and how it looks in most browsers):
这是在IE 9会发生什么(在顶部的白色栏是移动菜单应该被隐藏):
This is what happens in IE 9 (the white bar at the top is for the mobile menu which should be hidden):
到目前为止,我的唯一工具已经IE测试仪,它(如果它报告错误),我想不出如何查看。 IE9模式IE11其实看起来不错(虽然我来自客户的投诉,所以我知道IE9其实坏了)
So far my only tool has been IE tester, which (if it is reporting errors) I can't figure out how to view. IE9 Mode in IE11 actually looks fine (though I have received complaints from clients so I know IE9 actually is broken)
这里是我加载的资产我的布局顺序为:
@Styles.Render("~/bundles/themes/crisp/css")
@Scripts.Render("~/bundles/jquery")
@Styles.Render("~/bundles/less")
@Scripts.Render("~/bundles/modernizr")
和bundleconfig
public class BundleConfig
{
// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
{
if (ignoreList == null)
throw new ArgumentNullException("ignoreList");
ignoreList.Ignore("*.intellisense.js");
ignoreList.Ignore("*-vsdoc.js");
ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
//ignoreList.Ignore("*.min.js", OptimizationMode.WhenDisabled);
//ignoreList.Ignore("*.min.css", OptimizationMode.WhenDisabled);
}
public static void RegisterBundles(BundleCollection bundles)
{
bundles.IgnoreList.Clear();
AddDefaultIgnorePatterns(bundles.IgnoreList);
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
/*bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
"~/Scripts/jquery-ui-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.unobtrusive*",
"~/Scripts/jquery.validate*"));*/
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
/*bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));
bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
"~/Content/themes/base/jquery.ui.core.css",
"~/Content/themes/base/jquery.ui.resizable.css",
"~/Content/themes/base/jquery.ui.selectable.css",
"~/Content/themes/base/jquery.ui.accordion.css",
"~/Content/themes/base/jquery.ui.autocomplete.css",
"~/Content/themes/base/jquery.ui.button.css",
"~/Content/themes/base/jquery.ui.dialog.css",
"~/Content/themes/base/jquery.ui.slider.css",
"~/Content/themes/base/jquery.ui.tabs.css",
"~/Content/themes/base/jquery.ui.datepicker.css",
"~/Content/themes/base/jquery.ui.progressbar.css",
"~/Content/themes/base/jquery.ui.theme.css"));*/
bundles.Add(new StyleBundle("~/bundles/themes/crisp/css").Include(
"~/Content/themes/crisp/css/bootstrap.css",
"~/Content/themes/crisp/css/style.css",
"~/Content/themes/crisp/css/socialicoregular.css",
"~/Content/themes/crisp/css/font-awesome.css",
"~/Content/themes/crisp/css/hero-equal-thumb-gallery.css",
"~/Content/themes/crisp/css/tabs-toggle.css",
"~/Content/themes/crisp/css/portfolio.css",
"~/Content/themes/crisp/css/blog.css",
"~/Content/themes/crisp/css/gallery-folio-masonry.css",
"~/Content/themes/crisp/js/fancybox/source/jquery.fancybox.css",
"~/Content/themes/crisp/css/header-1.css"));
bundles.Add(new ScriptBundle("~/bundles/themes/crisp/js").Include(
"~/Content/themes/crisp/js/bootstrap.min.js",
"~/Content/themes/crisp/js/custom.js"));
bundles.Add(new LessBundle("~/bundles/less").Include(
"~/Content/NSA.less"));
}
}
我真的不知道要提供什么样的其他信息,但随便问!
I'm not really sure what other information to provide, but feel free to ask!
的(我认为)相关的CSS - 一个主旨,以防止这种冗长的获得
https://gist.github.com/anwyatt/11183367
推荐答案
我的第一个猜测是怪癖模式,已在IE中一个重大的痛苦,我...
My first guess would be the quirks mode, that has been a major pain in IE for me...
这篇关于IE9无法加载响应布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!