-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Mastering CSS
By :

Our big ol' call-to-action button is almost complete. We just need to add a gradient, which, like transforms, transitions, and border-radius, is a feature in CSS3.
Since the gradient specification and syntax is somewhat lengthy and isn't consistent between browsers, the easiest way to use it is through an app that will create the CSS output for us. Normally, I shy away from things such as these, as I prefer to write my own code, but I will make an exception for gradients. The ultimate CSS gradient generator seems to work very well for me. The site is www.colorzilla.com/gradient-editor/. The gradient that we're shooting for is fairly simple. It goes from light blue at the top to darker blue at the bottom:
Let's go to www.colorzilla.com/gradient-editor/. The tool defaults to something like this. At the top right, there is even a preview:
There are four color stops by default and all we need are two. So click on the two stops in the middle of...