Posted By

apphp-snippets on 12/22/15


Tagged

in CSS3 gradient


Versions (?)

Cross-Browser Gradient in CSS3


 / Published in: CSS
 

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

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

  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>

Report this snippet  

You need to login to post a comment.