Skip to content

Instantly share code, notes, and snippets.

@Ricardo-Diaz
Created October 25, 2012 22:33
Show Gist options
  • Save Ricardo-Diaz/3955904 to your computer and use it in GitHub Desktop.
Save Ricardo-Diaz/3955904 to your computer and use it in GitHub Desktop.
CSS: Linear-Gradient
Adding a gradient – linear-gradient
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.
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');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment