JSFiddle - React, Tailwind, and code Playground
by Francisco Maria Calisto
HTML
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Button Social Network Animation</title>
<link href='http://fonts.googleapis.com/css?family=Noto+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style.css">
<link rel='stylesheet prefetch' href='http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.min.css'>
</head>
<body>
<a href="#" title="Dribble"><i class="fa fa-dribbble"></i> Dribbble</a>
</body>
</html>
CSS
*, *:before, *:after {
box-sizing: border-box;
}
html, body {
height: 100%;
width: 100%;
}
body {
background: #222;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: 'Noto Sans', sans-serif;
}
a {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
text-decoration: none;
cursor: pointer;
border: 1px solid #EE3769;
border-radius: 8px;
height: 2.8em;
width: 10em;
padding: 0;
outline: none;
overflow: hidden;
color: #EE3769;
-webkit-transition: color 0.3s 0.1s ease-out;
transition: color 0.3s 0.1s ease-out;
text-align: center;
line-height: 250%;
}
a::before {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
content: '';
border-radius: 50%;
display: block;
width: 20em;
height: 20em;
line-height: 20em;
left: -5em;
text-align: center;
-webkit-transition: box-shadow 0.5s ease-out;
transition: box-shadow 0.5s ease-out;
z-index: -1;
}
a:hover {
color: #fff;
}
a:hover::before {
box-shadow: inset 0 0 0 10em #ee3769;
}
.button {
display:block;
text-align:center;
}