vdchristelle
9/9/2013 - 7:45 AM

CSS shadow effect

CSS shadow effect

.shadow {
  position: relative;
    
  &:before {
  z-index: -20;
  position: absolute;
  content: "";
  bottom: 18px;
  left: 10px;
  width: 50%;
  top: 70%;
  max-width:300px;
  -webkit-box-shadow: 0 15px 10px #777;
  -moz-box-shadow: 0 15px 10px #777;
  box-shadow: 0 15px 10px #777;
  -webkit-transform: rotate(-3deg);
  -moz-transform: rotate(-3deg);
  -o-transform: rotate(-3deg);
  -ms-transform: rotate(-3deg);
  transform: rotate(-3deg);
  }

  &:after {
    z-index: -20;
    position: absolute;
    content: "";
    bottom: 18px;
    left: 10px;
    width: 50%;
    top: 70%;
    max-width:300px;
    -webkit-box-shadow: 0 15px 10px #777;
    -moz-box-shadow: 0 15px 10px #777;
    box-shadow: 0 15px 10px #777;
    -webkit-transform: rotate(-3deg);
    -moz-transform: rotate(-3deg);
    -o-transform: rotate(-3deg);
    -ms-transform: rotate(-3deg);
    transform: rotate(-3deg);
    -webkit-transform: rotate(3deg);
    -moz-transform: rotate(3deg);
    -o-transform: rotate(3deg);
    -ms-transform: rotate(3deg);
    transform: rotate(3deg);
    right: 10px;
    left: auto;
  }
}