导航栏中的下拉列表出现问题。它昨晚工作正常,但我不知道发生了什么事情,引导程序只停留在下拉列表中。请帮我解决这个问题.Bootstrap文件链接工作正常,因为它适用于整个页面但不适用于导航栏下拉列表。
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<nav class="navbar navbar-default navbar-static-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand name-style" href="#"><span style="color: #4dc47d;">Abasyn Univeristy Islamabad Campus</span></a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Home
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="index.php"> Home </a></li>
<li><a href="about.php"> About</a></li>
<li><a href="history.php"> History </a></li>
<li><a href="vision.php"> Vision & Mission </a></li>
<li><a href="objectives.php"> Objectives </a></li>
<li><a href="messages.php"> Messages </a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Programs
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="undergrad.php"> Undergraduate </a></li>
<li><a href="graduate.php"> Graduate </a></li>
<li><a href="departments.php"> Departments</a></li>
<li> <a href="policies.php"> Rules and Policies </a> </li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Admission
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="addmission.php"> Admission Overview </a></li>
<li><a href="financialAid.php"> Financial Aid </a></li>
<li><a href="Scholarship.php"> Scholarships </a></li>
<li><a href="fee_Structure.php"> Fee Structure </a></li>
<li><a href="addmission_procedure.php"> Admission Procedure </a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Faculty
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="electrical_engineering.php"> Department of Electrical Engineering </a></li>
<li><a href="computing.php"> Department of Computing & Technology </a></li>
<li><a href="civil_enginnering.php"> Department of Civil Engineering </a></li>
<li><a href="management_sciences.php"> Department of Management Science </a></li>
<li><a href="life_sciences.php"> Department of Life Science </a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Research
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="projects.php"> Projects </a></li>
<li><a href="publications.php"> Publications </a></li>
<li><a href="conference.php"> Abasyn Intl. Conference </a></li>
<li><a href="journal.php"> Journal of Social Sciences </a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Students
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="activities.php"> Activities & Clubs </a></li>
<li><a href="http://abasynisb.edu.pk/pdf/Handbook-final-draft.pdf"> Student Handbook</a></li>
<li><a href="community.php"> Community Services</a></li>
<li><a href="student_schedules.php"> Student Schedules </a></li>
<li><a href="digital_library.php"> Digital Library </a></li>
<li><a href=""> Learning Management System </a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Center of M & E
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">About the Center</a></li>
<li><a href="#">OBE at AUIC</a></li>
<li><a href="#">Software System - TLS</a></li>
<li><a href="#"> Research and Analysis</a></li>
</ul>
</li>
</div>
</div>
&#13;
This是输出
答案 0 :(得分:0)
检查您使用过的css和js。如果添加这些Cdn将解决您的问题
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
解决方案:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<nav class="navbar navbar-default navbar-static-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand name-style" href="#"><span style="color: #4dc47d;">Abasyn Univeristy Islamabad Campus</span></a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Home
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="index.php"> Home </a></li>
<li><a href="about.php"> About</a></li>
<li><a href="history.php"> History </a></li>
<li><a href="vision.php"> Vision & Mission </a></li>
<li><a href="objectives.php"> Objectives </a></li>
<li><a href="messages.php"> Messages </a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Programs
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="undergrad.php"> Undergraduate </a></li>
<li><a href="graduate.php"> Graduate </a></li>
<li><a href="departments.php"> Departments</a></li>
<li> <a href="policies.php"> Rules and Policies </a> </li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Admission
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="addmission.php"> Admission Overview </a></li>
<li><a href="financialAid.php"> Financial Aid </a></li>
<li><a href="Scholarship.php"> Scholarships </a></li>
<li><a href="fee_Structure.php"> Fee Structure </a></li>
<li><a href="addmission_procedure.php"> Admission Procedure </a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Faculty
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="electrical_engineering.php"> Department of Electrical Engineering </a></li>
<li><a href="computing.php"> Department of Computing & Technology </a></li>
<li><a href="civil_enginnering.php"> Department of Civil Engineering </a></li>
<li><a href="management_sciences.php"> Department of Management Science </a></li>
<li><a href="life_sciences.php"> Department of Life Science </a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Research
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="projects.php"> Projects </a></li>
<li><a href="publications.php"> Publications </a></li>
<li><a href="conference.php"> Abasyn Intl. Conference </a></li>
<li><a href="journal.php"> Journal of Social Sciences </a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Students
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="activities.php"> Activities & Clubs </a></li>
<li><a href="http://abasynisb.edu.pk/pdf/Handbook-final-draft.pdf"> Student Handbook</a></li>
<li><a href="community.php"> Community Services</a></li>
<li><a href="student_schedules.php"> Student Schedules </a></li>
<li><a href="digital_library.php"> Digital Library </a></li>
<li><a href=""> Learning Management System </a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Center of M & E
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">About the Center</a></li>
<li><a href="#">OBE at AUIC</a></li>
<li><a href="#">Software System - TLS</a></li>
<li><a href="#"> Research and Analysis</a></li>
</ul>
</li>
</div>
&#13;
答案 1 :(得分:0)
<nav class="navbar navbar-default navbar-static-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand name-style" href="#"><span style="color: #4dc47d;">Abasyn Univeristy Islamabad Campus</span></a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Home
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="index.php"> Home </a></li>
<li><a href="about.php"> About</a></li>
<li><a href="history.php"> History </a></li>
<li><a href="vision.php"> Vision & Mission </a></li>
<li><a href="objectives.php"> Objectives </a></li>
<li><a href="messages.php"> Messages </a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Programs
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="undergrad.php"> Undergraduate </a></li>
<li><a href="graduate.php"> Graduate </a></li>
<li><a href="departments.php"> Departments</a></li>
<li> <a href="policies.php"> Rules and Policies </a> </li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Admission
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="addmission.php"> Admission Overview </a></li>
<li><a href="financialAid.php"> Financial Aid </a></li>
<li><a href="Scholarship.php"> Scholarships </a></li>
<li><a href="fee_Structure.php"> Fee Structure </a></li>
<li><a href="addmission_procedure.php"> Admission Procedure </a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Faculty
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="electrical_engineering.php"> Department of Electrical Engineering </a></li>
<li><a href="computing.php"> Department of Computing & Technology </a></li>
<li><a href="civil_enginnering.php"> Department of Civil Engineering </a></li>
<li><a href="management_sciences.php"> Department of Management Science </a></li>
<li><a href="life_sciences.php"> Department of Life Science </a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Research
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="projects.php"> Projects </a></li>
<li><a href="publications.php"> Publications </a></li>
<li><a href="conference.php"> Abasyn Intl. Conference </a></li>
<li><a href="journal.php"> Journal of Social Sciences </a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Students
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="activities.php"> Activities & Clubs </a></li>
<li><a href="http://abasynisb.edu.pk/pdf/Handbook-final-draft.pdf"> Student Handbook</a></li>
<li><a href="community.php"> Community Services</a></li>
<li><a href="student_schedules.php"> Student Schedules </a></li>
<li><a href="digital_library.php"> Digital Library </a></li>
<li><a href=""> Learning Management System </a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle list-bold" data-toggle="dropdown" href="#">Center of M & E
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">About the Center</a></li>
<li><a href="#">OBE at AUIC</a></li>
<li><a href="#">Software System - TLS</a></li>
<li><a href="#"> Research and Analysis</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>