How do I style my carousel dots to become like this ?
Here is what I have now.
Here is how I style it.
.slick-dots { position: absolute; bottom: -45px; list-style: none; display: block; text-align: center; padding: 0; width: 100%; }
.slick-dots li { position: relative; display: inline-block; height: 20px; width: 20px; margin: 0 5px; padding: 0; cursor: pointer; }
.slick-dots li button { border: 0; background: transparent; display: block; height: 20px; width: 20px; outline: none; line-height: 0; font-size: 0; color: transparent; padding: 5px; cursor: pointer; }
.slick-dots li button:hover, .slick-dots li button:focus { outline: none; }
.slick-dots li button:hover:before, .slick-dots li button:focus:before { opacity: 1; }
.slick-dots li button:before { position: absolute; top: 0; left: 0; content: "•"; width: 20px; height: 20px; font-family: "slick"; font-size: 6px; line-height: 5px; text-align: center; color: black; opacity: 0.25; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.slick-dots li.slick-active button:before { color: black; opacity: 0.75; }
HTML
<div class="row slick">
// a bunch of images
</div>
I threw this together which does it purely with HTML and CSS: http://jsfiddle.net/kajrttgv/2
<div class="container">
<span class="dot"></span>
<span class="dot active"></span>
<span class="dot"></span>
</div>
.dot {
background-color: #eee;
border: 1px solid #666;
border-radius: 5px;
box-shadow: inset 1px 1px 1px #888;
display: inline-block;
height: 10px;
width: 10px;
}
.dot.active {
background-color: #41ABE5;
box-shadow: inset 2px 0px 2px -2px #333;
}
this is my example
.slick-dots {
bottom: 50px;
li button:before,
li.slick-active button:before {
color: transparent;
opacity: 1;
}
li button:before{
background-color: transparent;
border: 4px solid #fff;
border-radius: 50%;
display: inline-block;
height: 20px;
width: 20px;
}
li.slick-active button:before {
background-color: #fff;
}
}
I have also tried to create some dots :p. JSFiddle: http://jsfiddle.net/Thaillie/o8q56tga/
<div class="container">
<span class="slickdot"></span>
<span class="slickdot active"></span>
<span class="slickdot"></span>
</div>
.container {
padding: 20px;
}
.slickdot {
height: 15px;
width: 15px;
background: lightgray;
border-radius: 50px;
display: inline-block;
box-shadow:0px 0px 4px gray inset;
}
.slickdot.active {
background-color: #41ABE5;
box-shadow: inset 0px 0px 4px #888888;
}
Here is how I would do it :
I will design every little pieces using Photoshop.
that way I can make it exactly like what you described.
I will create 2 small circle, with 20 px by 20 px
- 1.gradient light-blue and dark-blue
- 2.gradient black and gray
Save them as .PNG files and load them back into .CSS file
Then I'll apply the background-image: url("blue_dot.png");
to the blue one, and background-image: url("black_dot.png");
to the black one.
If needed, adjust your width
and height
to fit your needs.