Почему не появляется меню с кнопки

1
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Киномонстер Bootstrap</title>

<!-- Bootstrap -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>

<div class="container-fluid">
<div class="row">

<nav role="navigation" class="navbar navbar-inverse">
<div class="container">
<div class="navbar-header">

<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">

<span class="sr-only">navigator</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>

</div>

<div id="ЫnavbarCollapse" class="collapse navbar-collapse navbar-right">
<ul class="nav nav-pills">
<li class="active"> <a href="#">Главная</a> </li>
<li><a href="#">Фильмы</a> </li>
<li><a href="#">Сериалы</a> </li>
<li><a href="#">Рейтинг фильмов</a> </li>
<li><a href="#">Контакты</a> </li>
</ul>
</div>
</div>
</nav>
</div>
</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
bootstrap

5 ответов

2

У вас в строче ошибка:

<div id="ЫnavbarCollapse" 

Буква "Ы" явно лишняя :)

2
 <meta http-equiv="X-UA-Compatible" content="IE=edge"> - это из Bootstrap, нормально в общем это, а вот Ы не очень. 
3

Попробуйте подключить Bootstrap через CND, возможно у вас неверные пути к css и к js bootstrap файлам. Замените:

<script src="js/bootstrap.min.js"></script>

на 

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

и замените 

<link href="assets/css/bootstrap.min.css" rel="stylesheet">

на

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

Пример подключения бутстрап здесь на официальном сайте:

https://getbootstrap.com/docs/3.3/getting-started/

2
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Киномонстер Bootstrap</title>

<!-- Bootstrap -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>

<div class="container-fluid">
<div class="row">

<nav role="navigation" class="navbar navbar-inverse">
<div class="container">
<div class="navbar-header">

<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
<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="navbarCollapse" class="collapse navbar-collapse navbar-right">
<ul class="nav nav-pills">
<li class="active"> <a href="#">Главная</a> </li>
<li><a href="#">Фильмы</a> </li>
<li><a href="#">Сериалы</a> </li>
<li><a href="#">Рейтинг фильмов</a> </li>
<li><a href="#">Контакты</a> </li>
</ul>
</div>
</div>
</nav>
</div>
</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>

Тоже не получаеться

2

Во первых у тебя там лишний символ "Ы", после блока с "navbar-header", в поле 39.
А что за
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
Эйчтитипи протокол какой то?

Попробуй так написать: 

<div class="navbar-header header">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1><a href="index.html">КиноМонстр</a></h1>
<p>Кино - наша страсть!</p>
</div>
</div>
</div>
<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
Sign up or Log in to write an answer