【发布时间】:2014-05-19 09:25:15
【问题描述】:
我的 MVC 4 站点使用 Bundle.Config 类添加 CSS 文件
bundles.Add(new StyleBundle("~/Content/Styles").Include(
"~/Content/css/website.css",
"~/Content/css/banner.css"));
在我的本地主机上,当我查看源代码时,HTML 文件呈现为
<link href="/Content/css/website.css" rel="stylesheet"/>
<link href="/Content/css/banner.css" rel="stylesheet"/>
我现在已经实时部署了我的网站,但源代码只呈现了 1 行
<link href="/Content/Styles?v=fxCdHAOgPDvcROxkMfEwGQggO9uCfzckN3PaN8BOIzI1" rel="stylesheet"/>
奇怪的是,大多数 CSS 仍然显示(但图像不显示)。
我认为问题不在于我的 web.config 文件,因为本地和实时共享同一个文件。
我的问题是,如何消除这种行为并让实时服务器以与本地主机相同的方式呈现 HTML?
【问题讨论】:
标签: css .net asp.net-mvc iis rendering