JSFiddle - React, Tailwind, and code Playground
by Imri Paloja
HTML
<body>
<div class="imgholder">
<img src="http://i.imgur.com/55BpAX9.png" />
</div>
</body>
CSS
* {
margin: 0;
padding: 0;
}
body {
padding: 10px;
}
.imgholder {
position: relative; // added
margin: 5px;
// background: #fff;
float: left;
height: 200px;
/* border-radius: 200px / 110px;*/
/*transition: border-radius 0.3s ease-out;*/
}
.imgholder img,
.imgholder:after {
/*border-radius: 200px / 110px;*/
transition: 0.3s ease-out;
}
.imgholder:after {
content: '';
display: block;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(255,255,255,.3);
opacity: 0;
}
.imgholder:hover:after { opacity: 1; }
/*
.imgholder:hover{
border-radius: 20px;
}
*/
.imgholder:hover img,
.imgholder:hover:after {
/*border-radius: 20px;*/
}