JSFiddle - React, Tailwind, and code Playground
by Laurel Bruggeman
HTML
<div class="circle">
<span class="content">Content</span>
</div>
CSS
body {
padding: 20px;
}
.circle,.content {
-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-o-transition: all 2s ease-in-out;
-ms-transition: all 2s ease-in-out;
transition: all 2s ease-in-out;
}
.circle {
background: rgba( 99, 99, 99, 0.8 );
box-shadow: 1px 2px 2px rgba( 0, 0, 0, 0.8 );
border-radius: 100%;
color: white;
text-align: center;
font-family: sans-serif;
padding: 20px;
overflow: hidden;
-webkit-transform: scale( 0.1 );
-moz-transform: scale( 0.1 );
-o-transform: scale( 0.1 );
-ms-transform: scale( 0.1 );
transform: scale( 0.1 );
width: 400px;
height: 400px;
line-height: 400px;
}
.circle:hover {
-webkit-transform: scale( 1 );
-moz-transform: scale( 1 );
-o-transform: scale( 1 );
-ms-transform: scale( 1 );
transform: scale( 1 );
vertical-align: middle;
}
.content {
opacity: .1;
}
.circle:hover .content {
opacity: 1;
}