Cross-Browser Gradient in CSS3


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

The following code will display a cross-browser CSS-gradients. Th add the right selector you can use rgba() for transparency.


Copy this code and paste it in your HTML
  1. <style type="text/css">
  2. background-color: #000;
  3. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#bbb', endColorstr='#000');
  4. background-image: -webkit-gradient(linear, left top, left bottom, from(#bbb), to(#000));
  5. background-image: -webkit-linear-gradient(top, #bbb, #000);
  6. background-image: -moz-linear-gradient(top, #bbb, #000);
  7. background-image: -ms-linear-gradient(top, #bbb, #000);
  8. background-image: -o-linear-gradient(top, #bbb, #000);
  9. background-image: linear-gradient(top, #bbb, #000);
  10. </style>

URL: http://www.apphp.com/index.php?snippet=css-cross-browser-gradient

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.