Hover to show information.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css">
<style type="text/css">
body{
margin: 0;
padding: 0;
font-family: "montserrat",sans-serif;
}
.container{
position: absolute;
width: 100%;
top: 50%;
transform: translateY(-50%);
text-align: center;
}
.contact-method{
width: 220px;
height: 140px;
display: inline-block;
background: #3498db;
margin: 10px;
color: #fff;
position: relative;
cursor: pointer;
}
.contact-method i{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
font-size: 30px;
line-height: 140px;
background: #34495e;
z-index: 1;
transition: transform 0.6s;
}
.contact-method span{
position: absolute;
width: 100%;
left: 0;
bottom: 0;
padding: 10px 0;
}
.contact-method:hover i{
transform: translateY(-40px);
}
</style>
</head>
<body>
<div class="container">
<div class="contact-method">
<i class="fas fa-envelope"></i>
<span>email@domain.com</span>
</div>
<div class="contact-method">
<i class="fas fa-mobile-alt"></i>
<span>+000000000000</span>
</div>
<div class="contact-method">
<i class="fas fa-map-marker-alt"></i>
<span>Earth</span>
</div>
</div>
</body>
</html>