I am using Bootstrap 4 Beta 2 version to do a carousel. The code looks like below:
<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>
And the carousel indicator show as lines:
Is there a way I can change the indicators into dots instead of lines? I would assume it is an bootstrap option but I didn't find that relevant document. Do I need to write custom css for that?
Yes, I think you need to write custom CSS for doing lines into dots.
You just need to override two properties (
width
andheight
) and add a new one,border-radius
, to.carousel-indicators li
.Make
width
andheight
values equal eg:10px
each and give aborder-radius
of100%
.You just need to change the icon path in case you have one, using the inspect element you can get the class name. I used Mozilla to get the class name and then I used two svg icons for changing the default icons to custom icons.
I had to include .carousel for it to work properly.