Cross Browser CSS Gradients with Sass


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



Copy this code and paste it in your HTML
  1. @mixin gradient($first, $second) {
  2. background: $second;
  3. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='$first', endColorstr='$second');
  4. background: -webkit-gradient(linear, left top, left bottom, from($first), to($second));
  5. background: -moz-linear-gradient(top, $first, $second);
  6. }
  7.  
  8. .gradient {
  9. @include gradient(black, white);
  10. }

URL: cross-browser-css-gradients-with-sass

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.