在App_Start/BundleConfig配置 导入bootstrap,但不起作用,代码如下:

bundles.Add(new StyleBundle("~/Content/bootstrap/css").Include("~/Content/bootstrap/css/bootstrap.min.css"));

 

然后在模版页中,view/shared/_Layout.cshtml 添加绑定如下:

@Styles.Render("~/Content/bootstrap/css")

在页面中,查看源码,并没有导入此css样式文件。

问题在于:bundles添加绑定的真实物理地址(include中的部分)中不能含有min字样。使用正常未压缩版(文件名不带min字样)的即显示正常。

原理未解析。

相关文章:

  • 2022-12-23
  • 2021-07-03
  • 2022-12-23
  • 2021-11-23
  • 2021-08-26
  • 2021-07-06
  • 2021-12-16
猜你喜欢
  • 2021-10-02
  • 2022-01-21
  • 2022-12-23
  • 2021-05-06
  • 2021-08-13
  • 2022-12-23
  • 2021-10-19
相关资源
相似解决方案