"Carousel with text and box"
Bootstrap 4.1.1 Snippet by ReinierB78

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script> </head> <body> <div class="container-fluid"> <div id="myCarousel" class="carousel slide" data-ride="carousel"> <!-- Indicators --> <!-- Wrapper for slides --> <div class="carousel-inner"> <div class="item active"> <img src="https://demo.seothemes.com/business-pro/wp-content/uploads/2017/08/design-620x380.jpeg" alt="Los Angeles" style="width:100%;"> </div> <div class="item"> <img src="https://demo.seothemes.com/business-pro/wp-content/uploads/2017/08/design-620x380.jpeg" alt="Chicago" style="width:100%;"> </div> <div class="item"> <img src="https://demo.seothemes.com/business-pro/wp-content/uploads/2017/08/design-620x380.jpeg" alt="New york" style="width:100%;"> </div> </div> </div> <div class="text-box"> </div> <div id="myCarousel-2" class=" carousel-text slide" data-ride="carousel"> <div class="carousel-inner"> <div class="item active">Tekst 1</div> <div class="item ">Tekst 2</div> <div class="item ">Tekst 3</div> </div> </div> </div> </body> </html>
* { position: relative; box-sizing: border-box; } .text-box { position: absolute; width: 600px; height: 300px; background: #aaf; top: 50%; transform: translateY(-50%); } #myCarousel-2 { position: absolute; width: 600px; top: 50%; left: 60px; transform: translateY(-50%); color: #fff; }
$(document).ready(function(){ $('.carousel').carousel({ "pause": "false" }); $('.carousel-text').carousel({ "pause": "false" }); })

Related: See More


Questions / Comments: