To style hexagon indicators in CSS, you can use the following code:
Adjusting Icon Size
.carousel-indicators {
left: 0;
}
.carousel-indicators li {
width: 24px;
height: 15px;
background: red;
position: relative;
line-height: 0;
margin: 0 20px 0 0;
padding: 0;
border: 0;
border-radius: 0;
}
.carousel-indicators li:before {
content: "";
position: absolute;
top: -10px;
left: 0;
width: 0;
height: 0;
border-left: 12px solid transparent;
border-right: 12px solid transparent;
border-bottom: 10px solid red;
}
.carousel-indicators li:after {
content: "";
position: absolute;
bottom: -10px;
left: 0;
width: 0;
height: 0;
border-left: 12px solid transparent;
border-right: 12px solid transparent;
border-top: 10px solid red;
}
/*Active*/
.carousel-indicators li.active {
background: gray;
}
.carousel-indicators li.active:before {
border-bottom-color: gray;
}
.carousel-indicators li.active:after {
border-top-color: gray;
}
You may need to adjust the size and position of the hexagons on your slider based on your preferences. The code provided here is a starting point. I utilized this resource for creating hexagons and you can view the updated Fiddle here. I hope this information is helpful.
Additional Note:
To make the icons smaller, you will need to modify the width, height, and border properties of the .carousel-indicators li
, as well as adjust the positioning values of .carousel-indicators
li:before and .carousel-indicators li:after
. You also have to tweak the top
and bottom
positions accordingly. See here for an updated Fiddle.