Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

2. Hacking with Style > Hack 20. Build Gradients the Easy Way

Hack 20. Build Gradients the Easy Way

CSS3 gives you the ability to apply color gradients to the background of your HTML elements. Getting the right shading from your gradient properties can be quite difficult, but the folks at ColorZilla have built a tool to make it easy!

This hack was contributed by Alex Sirota, the mind and talent behind colorZilla.com and the ColorZilla Ultimate Gradient Generator.

Gradients are images that contain smooth color transitions between two or more colors. They are widely used in graphic and web design to create classy-looking backgrounds, slick buttons, and interesting visual effects for your pages.

Historically, you needed to use an image editor such as Photoshop or GIMP to create an image containing your gradient, save it in a file, and then apply it as a repeating background to your page or panel. Figure 2-22 shows an example.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint