Gradient Border Colors with CSS
CSS3 has all the new features. With these features, we are now able to build image-less websites. Earlier, We were using image when it comes to showing gradient colors. Now, it becomes much leaner with the use of CSS3 Gradient Background. But CSS3 Gradient does not stop only for background use. Did you know that you can also utilize it within borders? Let's see how to do this. First Method The first method is by applying CSS3 Gradient within pseudo-elements. Well, let’s see how the trick works. Top To Bottom Gradient Border We will start off with a simple gradient that spreads from top to bottom. To get started, create a box with a div, as follows. HTML <div class="box"></div> CSS .box { width: 400px; height: 400px; background: #eee; } To form the gradient in the box borders, set a solid border on the top and bottom side of the box first. And also create 2 rectangles ...