【问题标题】:Bootstrap not working with MVC4引导程序不适用于 MVC4
【发布时间】:2013-11-29 21:20:52
【问题描述】:

我已将高音扬声器引导程序(不是 MVC 的引导程序)下载到一个全新的 MVC4 项目中,但我无法使其工作。

浏览器的 F12 窗口中没有错误。

这是我的 _layout 代码:

<!DOCTYPE html>
<html>
  <head>
    <title>Bootstrap 101 Template</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="@Url.Content("~/Content/bootstrap-theme.min.css")" rel="stylesheet" media="screen">
  </head>
  <body>
    <script src="@Url.Content("~/Scripts/jquery-2.0.3.min.js")"></script>
    <script src="@Url.Content("~/Scripts/bootstrap.min.js")"></script>
    <h1>Hello, world!</h1>
      @RenderBody()
  </body>
</html>

当屏幕弹出时,我得到一个正常的 Hello, world!正文(无引导字体)。我的系统有以下文件:

我可能做错了什么?

【问题讨论】:

    标签: c# asp.net-mvc asp.net-mvc-4 twitter-bootstrap


    【解决方案1】:

    您只包含了 bootstrap-theme.min.css 文件,而不包含基本的 bootstrap.css 文件。 (尽管您确实包含了bootstrap.js 文件)

    【讨论】:

    • 起来!!!这就是 10 个小时的编码对你的大脑所做的事情......感谢 Andrew!
    猜你喜欢
    • 2019-02-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多