これは何度も投稿されたことがわかっていますが、解決策がまだ見つかりません。私はそれをモバイルで見てみようとブラウザを縮小してみましたが、すべてのnav collapseボタンは "折りたたまれていません"。私は他の投稿によって提供されたガイダンスに従ったが、誰も働いていなかった。私はdata-target
を正しいIDに設定しました。私はすべてのスクリプトのソースを持っています。モバイルブートストラップナビバーボタンが崩壊していない
マイコード:
nav ul li{
width:117px;
}
nav{
box-shadow: 15px 0px 45px #1f2021;
}
.navbar-fixed-top{
position:absolute!important;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1,
minimum-scale=1, maximum-scale=1" />
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Title</title>
<!-- Bootstrap -->
<link href="css/blog.css" rel="stylesheet" type="text/css">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/starter-template.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" media="only screen and (min-width:1261px)" href="css/custom.css">
<link rel="stylesheet" media="only screen and (min-width:781px) and
(max-width:1260px)" href="css/tablet.css">
<link rel="stylesheet" media="only screen and (max-width:780px)" href="css/mobile.css">
<script src="jquery-3.2.1.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js">
</script>
<script>
window.jQuery || document.write('<script
src = "../../assets/js/vendor/jquery.min.js" > < \/script>')
</script>
<script src="../../dist/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
<link rel="manifest" href="manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<div id="main-content">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="logoSpace">
<center> <img id="logo" src="img/logo.png"><br /></center>
</div>
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data- toggle="collapse" data-target="#navbar" aria-expanded="false" aria- controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="index.html">Home <span class="glyphicon glyphicon-home"
aria-hidden="true"></span></a></li>
<li><a href="about.html">About <span class="glyphicon
glyphicon-plus" aria-hidden="true"></span></a></li>
<li class="active"><a href="roster.html">Roster <span
class="glyphicon glyphicon-user"></span></a></li>
<li><a href="history.html">History <span class="glyphicon
glyphicon-list-alt"></span></a></li>
<li style="width:130px;float:left;"><a href="schedule.html">Schedule <span class="glyphicon glyphicon-list">
</span></a></li>
<li><a href="photos.html">Photos <span class="glyphicon
glyphicon-camera" aria-hidden="true"></span></a></li>
<li><a href="videos.html">Videos <span class="glyphicon
glyphicon-film"></span></a></li>
<li><a href="coaches.html">Coaches <span class="glyphicon
glyphicon-book"></span></a></li>
<li><a href="contact.html">Contact <span class="glyphicon
glyphicon-send"></a></li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</nav>
</body>
</html>
https://www.bootply.com/ZDsDf2k3F2 –
@RobertCそれは面白いで私のために罰金崩れているようです。 JSファイルが見つからないように見えますか? –
わかりません。 '