Cross Browser CSS Box Shadow with Sass


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



Copy this code and paste it in your HTML
  1. @mixin shadow($color: #333333) {
  2. -moz-box-shadow: 0px 1px 2px $color;
  3. -webkit-box-shadow: 0px 1px 2px $color;
  4. box-shadow: 0px 1px 2px $color;
  5. -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=90, Color='$color')";
  6. filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=90, Color='$color');
  7. }
  8.  
  9. .shadow {
  10. @include shadow(#111111);
  11. }

URL: cross-browser-css-box-shadow-with-sass

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.