<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css" media="all">
<style>
.socialNetwork {
position: relative;
width: 50px;
height: 50px;
border:2px solid gray;
border-radius: 50%;
box-sizing: border-box;
color:grey;
animation: out 0.25s linear both;
}
.socialNetwork:before {
position: absolute;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.socialNetwork:hover {
animation: in 0.25s linear both;
}
.socialNetwork:hover>div {
animation: inBackground 0.25s linear both;
}
.socialNetwork>div {
position:relative;
width:0%;
height:0%;
top:50%;
left:50%;
background-color: #ff008f;
border-radius: 50%;
z-index: -1;
}
@keyframes in {
to {
color:white;
font-size:24px;
}
}
@keyframes out {
to {
color:grey;
font-size:20px;
}
}
@keyframes inBackground {
to {
width: 100%;
height:100%;
left:0%;
top:0%;
}
}
</style>
</head>
<body>
<div class='socialNetwork fa fa-facebook'>
<div></div>
</div>
<div class='socialNetwork fa fa-twitter'>
<div></div>
</div>
<div class='socialNetwork fa fa-instagram'>
<div></div>
</div>
<div class='socialNetwork fa fa-linkedin'>
<div></div>
</div>
<div class='socialNetwork fa fa-whatsapp'>
<div></div>
</div>
</body>
</html>
Comentarios sobre la versión: 1 (1)