As creating a Carousel Slider with Boostrap

As creating a Carousel Slider with Boostrap

Diverse tools exist that allow to make a Slider as plugins of JQquery. But there are forms simpler to realise this. Using the Boostrap tool, a Carousel can be manipulated or be adapted Slider to our ill.

Before beginning with Bootstrap merry-go-round, it includes the beginning and his first bookstore jQuery.

<!-- Compiled and minified Bootstrap CSS -- 
< it connects  rel = “stylesheet?  href = “https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css? 
 <!-- minified JS library -- 
< script of  src = “https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js?  </ script of 
 <!-- Compiled and minified bootstrap Javascript -- 
< script of  src = “https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js?  </ script of 

In our code of example, we will try to show as it can extend the functionality Carousel Bootstrap and create the different types from the sliding bar.

In this example a basic speedboat is created merry-go-round.

<div you go = " myCarousel? class = " carousel slide? dates-ride = " carousel " > <! -- Indicators --> <ol class = " carousel-indicators " > <li dates-target = " #myCarousel? dates-slide-to = " 0? class = " activates " ></li> <li dates-target = " #myCarousel? dates-slide-to = " 1 " ></li> <li dates-target = " #myCarousel? dates-slide-to = " 2 " ></li> </ol> <! -- For Wrapper slides --> <div class = " carousel-inner " > <div class = " item activates " > <img src = " images/image-1.jpg? alt = "" > </div> <div class = " item " > <img src = " images/image-2.jpeg? alt = "" > </div> <div class = " item " > <img src = " images/image-3.jpeg? alt = "" > </div> </div> <! -- Controls --> <a class = " left carousel-control? href = " #myCarousel? dates-slide = " prev " > <span class = " glyphicon glyphicon-chevron-left " ></span> <span class = " Mr.-only " >Previous</span> </a> <a class = " right carousel-control? href = " #myCarousel? dates-slide = " next " > <span class = " glyphicon glyphicon-chevron-right " ></span> <span class = " Mr.-only " >Next</span> </a> </div>

Bootstrap Slider with subtitles.

In the following example a Slider is created and adds subtitles to the slides.

<div you go = " myCarousel? class = " carousel slide? dates-ride = " carousel " > <! -- Indicators --> <ol class = " carousel-indicators " > <li dates-target = " #myCarousel? dates-slide-to = " 0? class = " activates " ></li> <li dates-target = " #myCarousel? dates-slide-to = " 1 " ></li> <li dates-target = " #myCarousel? dates-slide-to = " 2 " ></li> </ol> <! -- For Wrapper slides --> <div class = " carousel-inner " > <div class = " item activates " > <img src = " images/image-1.jpg? alt = "" > </div> <div class = " item " > <img src = " images/image-2.jpeg? alt = "" > </div> <div class = " item " > <img src = " images/image-3.jpeg? alt = "" > </div> </div> <! -- Controls --> <a class = " left carousel-control? href = " #myCarousel? dates-slide = " prev " > <span class = " glyphicon glyphicon-chevron-left " ></span> <span class = " Mr.-only " >Previous</span> </a> <a class = " right carousel-control? href = " #myCarousel? dates-slide = " next " > <span class = " glyphicon glyphicon-chevron-right " ></span> <span class = " Mr.-only " >Next</span> </a> </div>

In the following code of example a slider with customized controls becomes.

<div you go = " myCarouselCustom? class = " carousel slide? dates-ride = " carousel " > <! -- Indicators --> <ol class = " carousel-indicators " > <li dates-target = " #myCarouselCustom? dates-slide-to = " 0? class = " activates " ></li> <li dates-target = " #myCarouselCustom? dates-slide-to = " 1 " ></li> <li dates-target = " #myCarouselCustom? dates-slide-to = " 2 " ></li> </ol> <! -- For Wrapper slides --> <div class = " carousel-inner " > <div class = " item activates " > <img src = " images/image-1.jpg? alt = "" > <div class = " carousel-caption " > <h3>First Slide</h3> <p >This is the first image slide</p> </div> </div> <div class = " item " > <img src = " images/image-2.jpeg? alt = "" > <div class = " carousel-caption " > <h3>Second Slide</h3> <p >This is the second image slide</p> </div> </div> <div class = " item " > <img src = " images/image-3.jpeg? alt = "" > <div class = " carousel-caption " > <h3>Third Slide</h3> <p >This is the third image slide</p> </div> </div> </div> <! -- Controls --> <a class = " left carousel-control? href = " #myCarousel? dates-slide = " prev " > <span class = " glyphicon glyphicon-chevron-left " ></span> <span class = " Mr.-only " >Previous</span> </a> <a class = " right carousel-control? href = " #myCarousel? dates-slide = " next " > <span class = " glyphicon glyphicon-chevron-right " ></span> <span class = " Mr.-only " >Next</span> </a> </div> <! -- Custom Controls --> <a href = " Javascript: void (0); you go = " prevBtn " >Prev Slide</a> <a href = " Javascript: void (0); ? you go = " nextBtn " >Next Slide</a>

** Code Javascript. **

<script type = " text/Javascript " > //Call carousel manually
$ (‘#myCarouselCustom’) .carousel (); //Go to the previous item
$ (“#prevBtn?) .click (function () \ {$ (“#myCarouselCustom?) .carousel (“prev?); }); //Go to the previous item
$ (“#nextBtn?) .click (function () \ {$ (“#myCarouselCustom?) .carousel (“next?); }); </script >

The following options are available to form Bootstrap Merry-go-round according to their needs.

  • interval (to number) – Specific the amount of lag time between the cycling automatically. Adjustment falsepara to stop the cycling automatically. Time of predetermined retardation is of 5000 milliseconds.
  • string slows down ( | null) – For a pause in the cycle of MouseEnter and has been resuming the cycle of mouseleave. Adjustment falsepara to stop a pause in bicycle in hovering. The value by defect is to hover.
  • wrap (they boolean) – Specific if the merry-go-round must continuous cycle or to stop in the last slide. The value by defect is true.
  • keyboard (they boolean) – Specific if the merry-go-round must react to keyboard events. The value by defect is true.

The following example shows how it is possible to be specified the options of the Carousel.

<script type = " text/Javascript " > $ (‘.carousel’) .carousel (\ {interval: 8000, slow down: true, wrap: false}); </script >

To see demo

Abimael Gutierrez P.

Abimael Gutierrez P.
Founder of apdesc

Home style of facebook using HTML and CSS

As to create a design Web similar to home or incio of facebook using HTML and CSS. In my case, I did the following thing. To create a file HTML with… Continuing reading

Home style of facebook using HTML and CSS

Published the 6 of April of the 2017