首页 > 解决方案 > 带有引导程序和个性化模板的 asp.net 母版页站点 - 侧边菜单未按预期用于便携式设备

问题描述

我正在使用带有个性化模板、SB Admin 2 和母版页的 bootstrap 4。这是我主人的头:

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Giano</title>

    <!-- Custom fonts for this template-->
    <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
    <link
        href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
        rel="stylesheet">

    <!-- Custom styles for this template-->
    <link href="css/sb-admin-2.min.css" rel="stylesheet">
     <!-- Bootstrap core JavaScript-->
    <script src="vendor/jquery/jquery.min.js"></script>
    <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

    <!-- Core plugin JavaScript-->
    <script src="vendor/jquery-easing/jquery.easing.min.js"></script>

    <!-- Custom scripts for all pages-->
    <script src="js/sb-admin-2.min.js"></script>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>

出于某种原因,侧边菜单无法正常工作,这里是实时预览来测试侧边菜单的预期效果:https ://startbootstrap.com/previews/sb-admin-2 在我的项目中,底部按钮不起作用,所以我不能把它缩小到只显示图标,而且带有自动隐藏菜单(并显示经典汉堡图标)的移动设备适配也不起作用。菜单始终保持可见。我知道这个问题与<!-- Core plugin JavaScript-->标签下方导入的位置有关,因为如果将那部分移到<body>.

标签: htmlasp.netvb.nettwitter-bootstrapbootstrap-4

解决方案


推荐阅读