Read all the topics with the same problem and did everything that helped those in need, bat all of that doesn't work in my code( Please help.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="width=device-width, initial-scale=1" name="viewport">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link href='https://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<div class="main">
<div class="container">
<div class="row">
<div class="btn-group">
<button class="btn btn-primary btn-lg dropdown-toggle students" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">First <span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="#">sub first</a></li>
<li><a href="#">sub second</a></li>
</ul>
</div>
<button type="button" class="btn btn-primary btn-lg teachers">Second</button>
</div>
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" src="js/hover.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>
答案 0 :(得分:0)
您尚未加入课程dropdown
。您需要在此课程下包含下拉按钮和菜单,它才能正常工作。