gpt4 book ai didi

javascript - Bootstrap 在本地工作,但在部署时不工作

转载 作者:太空宇宙 更新时间:2023-11-03 18:15:59 24 4
gpt4 key购买 nike

我正在使用 MVC 框架和 Bootstrap 来优化网站。一切都在本地工作,而不是在服务器上。该网站没有任何 css watsoever。此外,首页应该是一个旋转木马 slider ,现在它只是所有以垂直方式显示的图片。有什么问题?

这是我的代码:

@using System.Web.Optimization;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - The Secured Password</title>
@Scripts.Render("~/bundles/bootstrap")
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery")
@*@Scripts.Render("~/bundles/jqueryval")*@
@RenderSection("scripts", required: false)
</head>
<body>
<div class="navbar-wrapper">
<div class="container">

谢谢!

编辑:

这是呈现的标题:

<link href="/Content/css?v=UV-jZ4aDFGX-mj3fDEnMFNwudw9kdbZQj1zFCxtmgps1"   rel="stylesheet">

<script src="/bundles/modernizr?v=wBEWDufH_8Md-Pbioxomt90vm6tJN2Pyy9u9zHtWsPo1"> </script><style type="text/css"></style>

<script src="/bundles/jquery?v=FVs3ACwOLIVInrAl5sdzR2jrCDmVOWFbZMY6g6Q0ulE1"></script>

<script src="/bundles/bootstrap?v=HHeOtfpYTGpvkQWzPsmQOp39ZdG4zLSAsANOtnmyV-g1"></script>

编辑#2:以下是 bundleconfig.cs 的内容:

public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Content/Scripts/jquery-{version}.js"));

bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Content/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(
"~/Content/Scripts/modernizr-*"));

bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Content/Scripts/bootstrap.js",
"~/Content/CSS/respond.js"));

bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/CSS/bootstrap.css",
"~/Content/CSS/Site.css"));
}
}

最佳答案

没有什么可以呈现 Bootstrap 自己的 css 文件(bootstrap[.min].css 和 bootstrap-theme[.min].css)。

关于javascript - Bootstrap 在本地工作,但在部署时不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22800798/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com