.img-has-effect { position: relative; @include transition(all .3s); &:after { content: ''; position: absolute; left: 0; height: 100%; width: 100%; visibility: hidden; opacity: 0; z-index: 1; top: 0; background: rgba(0, 0, 0, 0.5); -webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease; transition: all 0.5s ease; -moz-transform: scale(0); -ms-transform: scale(0); -webkit-transform: scale(0); transform: scale(0); } &:hover { &:after { visibility: visible; opacity: 1; -moz-transform: scale(1); -ms-transform: scale(1); -webkit-transform: scale(1); transform: scale(1); } } }