CSS3 Background Gradient


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. .gradient-bg {
  2. /* fallback/image non-cover color */
  3. background-color: #1a82f7;
  4.  
  5. /* fallback image */
  6. background-image: url(images/fallback-gradient.png);
  7.  
  8. /* Firefox 3.6+ */
  9. background-image: -moz-linear-gradient(#2F2727, #1a82f7);
  10.  
  11. /* Safari 4+, Chrome 1+ */
  12. background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#1a82f7), to(#2F2727));
  13.  
  14. /* Safari 5.1+, Chrome 10+ */
  15. background-image: -webkit-linear-gradient(#2F2727, #1a82f7);
  16.  
  17. /* Opera 11.10+ */
  18. background-image: -o-linear-gradient(#2F2727, #1a82f7);
  19. }

URL: http://css-tricks.com/css3-gradients/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.