Fun hover effect with CSS3 transform and transition
Fun hover effect with CSS3 transform and transition
by Nirvanachain
HTML
<div class="container">
<a href="#" class="link"></a>
</div>
CSS
.container {
width:100%
}
.link:before {
background-color: #3DAAE9;
border-radius: 50% 50% 50% 50%;
content: "";
display: block;
height: 0;
opacity: 0;
padding-top: 100%;
position: absolute;
top: 0;
-ms-transform: scale(0);
-webkit-transform: scale(0);
transform: scale(0);
-webkit-transition: all 0.5s ease 0s;
transition: all 0.5s ease 0s;
width: 100%;
}
.link {
width: 25%;
background-image: url('http://i.imgur.com/rR1oRDZ.jpg');
background-color: #333333;
background-position: center center;
background-size: 100% 100%;
border-radius: 50% 50% 50% 50%;
color: #3DAAE9;
display:block;
height: 0;
padding-top: 25%;
position: relative;
text-align: center;
text-decoration: none;
}
.link:hover {
outline: 0 none;
}
.link:hover:before {
opacity: 0.5;
-ms-transform: scale(1);
-webkit-transform: scale(1);
transform: scale(1);
}