<div class="flex-row">
  <div class="card"></div>
  <div class="card"></div>
  <div class="card"></div>
  <div class="card"></div>
  <div class="card"></div>
  <div class="card"></div>
  <div class="card"></div>
  <div class="card"></div>
</div>
@mixin transition($x, $y, $z){
  transition: $x $y $z;
  -moz-transition: $x $y $z;
  -ms-transition: $x $y $z;
  -webkit-transition: $x $y $z;
  -o-transition: $x $y $z;
}

@mixin rotate($x){
  -ms-transform: rotate($x); /* IE 9 */
   -webkit-transform: rotate($x); /* Chrome, Safari, Opera */
   transform: rotate($x);
}

@mixin scale($x){
  transform: scale($x);
  -moz-transform: scale($x);
  -webkit-transform: scale($x);
  -o-transform: scale($x);
  -ms-transform: scale($x); 
}

.flex-row {
  display: flex;
  justify-content: center;
  position: relative;
  width: 100%;
  flex-flow: row wrap;
  // overflow: hidden;
}

//Use this class as wrapper to keep content INSIDE the card
.flex-wrapper {
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.card {
  background-color: purple;
  display: inline-block;
  max-width: 300px;
  min-width: 150px;
  min-height: 200px;
  content: "";
  margin: 1rem 1rem 0 0;
  box-shadow: 0 1px 3px 0 rgba(58, 62, 75, 0.25);
  flex: 0 0 25%;
  align-items: flex-start;
  align-content: flex-start;
  border-radius: .2rem;
  @include transition(all, 250ms, ease-in-out);
  
  &:hover {
    @include scale(1.1);
    filter: saturate(50%);
    @include rotate(3deg);
  }
  
  &:active {
    filter: blur(.05rem);
    @include rotate(-3deg);
  }

  &:last-child {
    margin-right: none;
    background-color: purple;
    background-image: url("https://goo.gl/LURaLH");
    background-size: cover;
    background-position: center center;
  }

  &:first-child {
    margin-left: none;
    background-color: orange;
  }
}
View Compiled
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.