JSFiddle - React, Tailwind, and code Playground
by Nikhil krishnan
HTML
<aside class="grid">
<figure><img src="http://lorempixel.com/500/500/sports/1/" alt=""></figure>
</aside>
<aside class="grid">
<figure><img src="http://lorempixel.com/500/500/sports/2/" alt=""></figure>
</aside>
SCSS
* {
padding: 0;
bottom: 0;
}
.grid {
width: 40%;
float: left;
padding: 10px;
background-color: red;
figure {
margin: 0;
opacity: 1;
filter: alpha(opacity=100);
overflow: hidden;
-webkit-transition: all, 0.3s, linear;
-o-transition: all, 0.3s, linear;
transition: all, 0.3s, linear;
img {
max-width: 100%;
min-width: 100%;
-webkit-transition: all, 0.3s, linear;
-o-transition: all, 0.3s, linear;
transition: all, 0.3s, linear;
-webkit-filter: blur(0);
-moz-filter: blur(0);
filter: blur(0);
-webkit-transform: scale(1) translate3d(0, 0, 0);
-moz-transform: scale(1) translate3d(0, 0, 0);
-ms-transform: scale(1) translate3d(0, 0, 0);
-o-transform: scale(1) translate3d(0, 0, 0);
transform: scale(1) translate3d(0, 0, 0);
}
}
&:hover {
figure {
opacity: 0.55;
filter: alpha(opacity=55);
img {
-webkit-filter: blur(8px);
-moz-filter: blur(8px);
filter: blur(8px);
-webkit-transform: scale(1.06) translate3d(0, 0, 0);
-moz-transform: scale(1.06) translate3d(0, 0, 0);
-ms-transform: scale(1.06) translate3d(0, 0, 0);
-o-transform: scale(1.06) translate3d(0, 0, 0);
transform: scale(1.06) translate3d(0, 0, 0);
}
}
}
}