Skip to content

Instantly share code, notes, and snippets.

@magemore
Created April 25, 2012 04:49
Show Gist options
  • Save magemore/2486486 to your computer and use it in GitHub Desktop.
Save magemore/2486486 to your computer and use it in GitHub Desktop.
CSS Adding a gradient – linear-gradient
background: -webkit-gradient(linear, left top, left bottom, from(#74b8d7), to(#437fbc));
background: -moz-linear-gradient(top, #74b8d7, #437fbc);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#74b8d7', endColorstr='#437fbc');
@magemore
Copy link
Author

With CSS3, you no longer need a background image for gradients – you can use CSS to add a gradient to the background of something. Change the color hex values (“74b8d7″ and “437fbc”) to the color gradient you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment