Bootstrap Carousel Code

Following is the piece of code that can be used to implement Bootstrap Carousel with indicators showing at the bottom of the carousel. It’s also adaptive for mobile devices.


<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
	<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>

<body>

	<style type="text/css">
			
		/* Slideshow */
		.carousel-inner > .item > img,
		.carousel-inner > .item > a > img {
			width: 100%;
			margin: auto;
		}
		#myCarousel .carousel-control{
		    top: 50%;
		    bottom: 50%;
		    background-image: none;
		}
		.carousel-indicators li {
		    display: inline-block;
		    width: 12px;
		    height: 12px;
		    margin: 10px;
		    text-indent: 0;
		    cursor: pointer;
		    border: none;
		    border-radius: 50%;
		    background-color: #eeeeee;
		}
		.carousel-indicators .active {
		    width: 12px;
		    height: 12px;
		    margin: 10px;
		    background-color: #1e73be;
		}
		.carousel-text {
			background-color: rgba(255, 255, 255, 0.9); 
			height: 140px; 
			border-radius: 3px;
			padding-top: 10px;	
			z-index: 1;
		}
		@media (min-width: 10px) and (max-width: 991px) {
			.carousel-text {
				margin-bottom: -25px;
				height: 55px; 				
			}
		}

	</style>


	<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="5000" style="border-bottom: 1px solid #dddddd;">

		<!-- Indicators  -->
		<ol class="carousel-indicators" style="bottom: -15px;">
		  <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
		  <li data-target="#myCarousel" data-slide-to="1"></li>
		</ol>

	    <!-- Wrapper for slides -->
	    <div class="carousel-inner" role="listbox" >
	        <div class="item active">
				<img src="http://via.placeholder.com/1920x480" height="480" width="1920" alt="Slide 1"  />
				<div class="container">
					<div class="carousel-caption">
						<div class="carousel-text" style="height: 70px;">
							<h1>Slide 1</h1>
						</div>
					</div>
				</div>
	        </div>
	        <div class="item">
				<img src="http://via.placeholder.com/1920x480" height="480" width="1920" alt="Slide 2" />        
				<div class="container">
					<div class="carousel-caption">
						<div class="carousel-text" style="height: 70px;">
							<h1>Slide 2</h1>
						</div>
					</div>
				</div>			
	        </div>
	        <div class="item">
				<img src="http://via.placeholder.com/1920x480" height="480" width="1920" alt="Slide 3" />        
				<div class="container">
					<div class="carousel-caption">
						<div class="carousel-text" style="height: 70px;">
							<h1>Slide 3</h1>
						</div>
					</div>
				</div>			
	        </div>
	    </div>

	    <!-- Left and right controls -->
	    <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev" style="margin-top: -32px;">
	      <span class="glyphicon glyphicon-chevron-left" aria-hidden="true" style="font-size: 50px; margin-left: -95px;"></span>
	      <span class="sr-only">Previous</span>
	    </a>
	    <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next" style="margin-top: -32px;">
	      <span class="glyphicon glyphicon-chevron-right" aria-hidden="true" style="font-size: 50px; margin-right: -75px;""></span>
	      <span class="sr-only">Next</span>
	    </a>
	</div>

	<script language="JavaScript" type="text/javascript">
		// trigger on slide change
		jQuery('#myCarousel').bind('slid.bs.carousel', function (e) {
			
		});
	</script>

	<!-- Slideshow ends -->

</body>
</html>