Моя карусель не показывает слайды. Кажется, у меня проблема с классом. Carousel, потому что, когда я удаляю его, карусель работает, но не индикаторыBootstrap Карусель, не показывающий слайды
У меня есть другая карусель, работающая на других страницах. Я щекочу css и ничего не называю классом. быть помехой
Вы видите, что я здесь не вижу?
Вот код целиком.
<!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">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>QTZ</title>
<!-- CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/navbar-fixed-side.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- 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]-->
<style type="text/css">
.carousel-indicators {
position: absolute;
top: 22em !important;
left: 50%;
z-index: 15;
width: 60%;
padding-left: 0;
margin-left: -30%;
text-align: center;
list-style: none;
}
.carousel-indicators li {
display: inline-block;
width: 14px;
height: 14px;
margin: 1px;
text-indent: -999px;
cursor: pointer;
background-color: #000\9;
background-color: rgba(0,0,0,0);
border: 1px solid #fff;
border-radius: 10px;
}
.carousel-indicators .active {
width: 14px;
height: 14px;
margin: 1px;
background-color: white;
}
.carousel .item>img {
top: 0;
left: 0;
max-width: 100%;
}
.carousel-indicators li {
box-shadow: 0px 0px 6px #000;
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-sm-9 col-lg-10">
<div class="row">
<div id="myCarousel" class="carousel slide">
<!-- INDICADORES CAROUSEL -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
</ol>
<!-- SLIDES -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="images/murales2015-1.jpg" alt="" style="width:100%;">
</div>
<div class="item">
<img src="images/murales2015-2.jpg" alt="" style="width:100%;">
</div>
<div class="item">
<img src="images/murales2015-3.jpg" alt="" style="width:100%;">
</div>
<div class="item">
<img src="images/murales2015-4.jpg" alt="" style="width:100%;">
</div>
</div>
</div>
</div>
</div>
</div><!--fin contenido-->
</div>
</body>
<script>
$(document).ready(function(){
// Activate Carousel
$("#myCarousel").carousel({interval: 6000, pause: ""});
// Enable Carousel Indicators
$(".item1").click(function(){
$("#myCarousel").carousel(0);
});
$(".item2").click(function(){
$("#myCarousel").carousel(1);
});
$(".item3").click(function(){
$("#myCarousel").carousel(2);
});
$(".item4").click(function(){
$("#myCarousel").carousel(3);
});
});
</script>
<script src="js/main.js"></script> <!-- Gem jQuery -->
<script src="js/bootstrap.min.js"></script>
</html>
Проверьте консоль на наличие ошибок? – j08691
Пожалуйста, прочитайте, как создать [минимальный, полный и проверяемый пример] (http://stackoverflow.com/help/mcve). –
Почему у вас есть javascript? Не загружается ли самозапуск автоматически для вас? – 2pha