Carousel Bootstrap

2

Hello, I wanted to know how to change these indicators, instead of buttons for texts, follow the code below:

 <div id="myCarousel" class="carousel slide" data-interval="3000" data-ride="carousel">
    <!-- Carousel indicators -->
    <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>
    </ol>   

CSS

.carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  z-index: 15;
  width: 60%;
  margin-left: -30%;
  padding-left: 0;
  list-style: none;
  text-align: center;
}
.carousel-indicators li {
  display: inline-block;
  width: 100px;
  height: 100px;
  margin: 1px;
  
  border: 1px solid #fff;
  border-radius: 10px;
  cursor: pointer;
  background-color: red;
  background-color: blue;
}
.carousel-indicators .active {
  margin: 0;
  width: 120px;
  height: 120px;
  background-color: red;
}
    
asked by anonymous 10.02.2015 / 13:43

1 answer

2

Here is an example of implementing the Bootstrap Carousel with text in place of the next and previous buttons:

<div id="myCarousel" class="carousel slide" data-interval="3000" data-ride="carousel">
<!-- Carousel indicators -->
<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>
</ol>

<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
    <div class="item active">
        <img src="..." />
        <div class="carousel-caption">...</div>
    </div>
    <div class="item">
        <img src=..." />
        <div class="carousel-caption">...</div>
    </div>
        ...
</div>

<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
    <span>Anterior</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
    <span>Próximo</span>
</a>
</div>
    
10.02.2015 / 14:27