简体   繁体   中英

How can I remove bootstrap carousel indicators number?

Hi I use bootstrap carousel but i dont want to use bootstrap indicators i want to use own indicator to change slide. Here is numbers which i dont want to my carousel. enter image description here Here is my code related in indicators and

<div id="carousel-example-2" class="carousel slide carousel-fade " style="margin-top: 12px;" data-ride="carousel">

<ol>
  <li data-target="#carousel-example-2" data-slide-to="0" class="active" style="margin-top: -60px;position: absolute;z-index: 500;margin-left: 550px;margin-top: 390px;"><button style="border-radius: 50%;padding: 7px;background-image: url(images/mflogo2.jpg);width: 50px;height: 50px;background-size:contain;background-repeat: no-repeat;"></button></li>
  <li data-target="#carousel-example-2" data-slide-to="1" style="margin-top: -60px;position: absolute;z-index: 500;margin-left: 610px;margin-top: 390px;"><button style="border-radius: 50%;padding: 7px;background-image: url(images/lab.jpg);width: 50px;height: 50px;background-size:cover;background-repeat: no-repeat;"></button></li>
  <li data-target="#carousel-example-2" data-slide-to="2" style="margin-top: -60px;position: absolute;z-index: 500;margin-left: 670px;margin-top: 390px;"><button style="border-radius: 50%;padding: 7px;background-image: url(images/code.jpg);width: 50px;height: 50px;background-size:cover;background-repeat: no-repeat;"></button></li>
  <li data-target="#carousel-example-2" data-slide-to="3" style="margin-top: -60px;position: absolute;z-index: 500;margin-left: 730px;margin-top: 390px;"><button style="border-radius: 50%;padding: 7px;background-image: url(images/study.jpg);width: 50px;height: 50px;background-size:cover;background-repeat: no-repeat;"></button></li>
  <li data-target="#carousel-example-2" data-slide-to="4" style="margin-top: -60px;position: absolute;z-index: 500;margin-left: 790px;margin-top: 390px;"><button style="border-radius: 50%;padding: 7px;background-image: url(images/lab2.jpg);width: 50px;height: 50px;background-size:cover;background-repeat: no-repeat;"></button></li>
  <li data-target="#carousel-example-2" data-slide-to="5" style="margin-top: -60px;position: absolute;z-index: 500;margin-left: 850px;margin-top: 390px;"><button style="border-radius: 50%;padding: 7px;background-image: url(images/lab3.jpg);width: 50px;height: 50px;background-size:cover;background-repeat: no-repeat;"></button></li>
  <li data-target="#carousel-example-2" data-slide-to="6" style="margin-top: -60px;position: absolute;z-index: 500;margin-left: 910px;margin-top: 390px;"><button style="border-radius: 50%;padding: 7px;background-image: url(images/class.jpg);width: 50px;height: 50px;background-size:cover;background-repeat: no-repeat;"></button></li>
</ol>

You can do it with ::marker and add font-size:0 also you can style it whatever you want.

Here is snippet

 li::marker{font-size:0;}
 <ol> <li data-target="#carousel-example-2" data-slide-to="0" class="active" style="margin-top: -60px;position: absolute;z-index: 500;margin-left: 550px;margin-top: 390px;"><button style="border-radius: 50%;padding: 7px;background-image: url(images/mflogo2.jpg);width: 50px;height: 50px;background-size:contain;background-repeat: no-repeat;"></button></li> <li data-target="#carousel-example-2" data-slide-to="1" style="margin-top: -60px;position: absolute;z-index: 500;margin-left: 610px;margin-top: 390px;"><button style="border-radius: 50%;padding: 7px;background-image: url(images/lab.jpg);width: 50px;height: 50px;background-size:cover;background-repeat: no-repeat;"></button></li> <li data-target="#carousel-example-2" data-slide-to="2" style="margin-top: -60px;position: absolute;z-index: 500;margin-left: 670px;margin-top: 390px;"><button style="border-radius: 50%;padding: 7px;background-image: url(images/code.jpg);width: 50px;height: 50px;background-size:cover;background-repeat: no-repeat;"></button></li> <li data-target="#carousel-example-2" data-slide-to="3" style="margin-top: -60px;position: absolute;z-index: 500;margin-left: 730px;margin-top: 390px;"><button style="border-radius: 50%;padding: 7px;background-image: url(images/study.jpg);width: 50px;height: 50px;background-size:cover;background-repeat: no-repeat;"></button></li> <li data-target="#carousel-example-2" data-slide-to="4" style="margin-top: -60px;position: absolute;z-index: 500;margin-left: 790px;margin-top: 390px;"><button style="border-radius: 50%;padding: 7px;background-image: url(images/lab2.jpg);width: 50px;height: 50px;background-size:cover;background-repeat: no-repeat;"></button></li> <li data-target="#carousel-example-2" data-slide-to="5" style="margin-top: -60px;position: absolute;z-index: 500;margin-left: 850px;margin-top: 390px;"><button style="border-radius: 50%;padding: 7px;background-image: url(images/lab3.jpg);width: 50px;height: 50px;background-size:cover;background-repeat: no-repeat;"></button></li> <li data-target="#carousel-example-2" data-slide-to="6" style="margin-top: -60px;position: absolute;z-index: 500;margin-left: 910px;margin-top: 390px;"><button style="border-radius: 50%;padding: 7px;background-image: url(images/class.jpg);width: 50px;height: 50px;background-size:cover;background-repeat: no-repeat;"></button></li> </ol>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM