
Responsive Icon Box
Before We Start to Responsive Icon Box
Responsive Icon Box can be used to animate a Cards, Buttons, etc. and create user attractive UI components.
So if you are a person who wishes to develop a website, you have to know how to create animations properly. Check out our tutorial and you can learn this techniques and use it on your web development. Below sections shows how to develop this animations.
How to create? We are here to solve your problem. In this article we discuss how to create a hover effect animations. Before we start please read the below articles which easier you to understand the process, if you are new to development.
Step 1 – Add HTML
It’s too easy and simple. Just copy and paste below code in your HTML editor between <body> </body> tag as below.
<div class="container">
<ul>
<li>
<a href="#">
<span class="title">Icon 1</span>
<span class="icons"><i class="fa fa-camera"></i></span>
</a>
</li>
<li>
<a href="#"><span class="title">Icon 2</span>
<span class="icons"><i class="fa fa-map-marker"></i></span>
</a>
</li>
<li>
<a href="#"><span class="title">Icon 3</span>
<span class="icons"><i class="fa fa-share-alt"></i></span>
</a>
</li>
<li>
<a href="#"><span class="title">Icon 4</span>
<span class="icons"><i class="fa fa-user-plus"></i></span>
</a>
</li>
</ul>
</div>
Step 2 – Add CSS
We use some external CSS link to this code. No need to worry about this, copy and paste below code in between <head></head> tag.
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" crossorigin="anonymous"/>
Copy and paste below code in your HTML editor between <style></style> tag as below.
<style>
@keyframes box {
from {
opacity: 0;
filter: alpha(opacity=0);
}
to {
opacity: 100;
filter: alpha(opacity=100);
}
}
@-moz-keyframes box
/* Firefox */
{
from {
opacity: 0;
filter: alpha(opacity=0);
}
to {
opacity: 100;
filter: alpha(opacity=100);
}
}
@-webkit-keyframes box
/* Safari and Chrome */
{
from {
opacity: 0;
filter: alpha(opacity=0);
}
to {
opacity: 100;
filter: alpha(opacity=100);
}
}
@-o-keyframes box
/* Opera */
{
from {
opacity: 0;
filter: alpha(opacity=0);
}
to {
opacity: 100;
filter: alpha(opacity=100);
}
}
body {
font-family: "Poppins", sans-serif;
background: #f6f2e7;
}
.container {
max-width: 1200px;
margin: auto;
}
ul {
list-style-type: none;
margin: 20px 0 0 0;
padding: 0;
}
li {
float: left;
margin: 0 1.041666666667%;
width: 22.916666666667%;
}
li:last-child {
margin-right: 0;
}
li a {
border-radius: 8px;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
text-align: center;
margin-bottom: 10px;
margin-top: 10px;
padding-bottom: 40px;
-webkit-box-shadow: inset 0px 1px 5px 0px rgba(0, 0, 0, 0.2);
box-shadow: inset 0px 1px 5px 0px rgba(0, 0, 0, 0.2);
animation: box 3s;
-moz-animation: box 3s;
/* Firefox */
-webkit-animation: box 3s;
/* Safari and Chrome */
-o-animation: box 3s;
/* Opera */
}
li:nth-child(1) a {
background: #e1d9c7;
}
li:nth-child(2) a {
background: #efc5ab;
}
li:nth-child(3) a {
background: #81bd92;
}
li:nth-child(4) a {
background: #4ecdee;
}
li span {
display: block;
}
li a {
color: #2f2c28;
text-decoration: none;
display: block;
border-radius: 8px;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
-webkit-transition: all 0.3s linear;
-moz-transition: all 0.3s linear;
-ms-transition: all 0.3s linear;
-o-transition: all 0.3s linear;
transition: all 0.3s linear;
border: 1px solid rgba(0, 0, 0, 0.3);
}
li:nth-child(1) a:hover {
background: #7a6746;
border: 1px solid #564734;
}
li:nth-child(2) a:hover {
background: #68351e;
border: 1px solid #68351e;
}
li:nth-child(3) a:hover {
background: #364238;
border: 1px solid #364238;
}
li:nth-child(4) a:hover {
background: #003335;
border: 1px solid #003335;
}
li a span.title {
font-size: 24px;
padding: 20px 0;
}
li a span.icons {
font-size: 60px;
line-height: 150px;
padding: 0;
background-color: rgba(255, 255, 255, 0.3);
border: 1px solid rgba(0, 0, 0, 0.7);
height: 150px;
-moz-border-radius: 75px;
-webkit-border-radius: 75px;
width: 150px;
text-align: center;
background-color: rgba(255, 255, 255, 0.3);
border: 1px solid rgba(0, 0, 0, 0.7);
margin: auto;
}
li a:hover span.icons {
color: #fff;
}
li a:hover span.title {
color: rgba(255, 255, 255, 0.5);
}
@media only screen and (min-width: 768px) and (max-width: 959px) {
li {
width: 44.791666666667%;
margin-left: 2.604166666667%;
margin-right: 2.604166666667%;
margin-bottom: 1.302083333333%;
}
li a {
padding-bottom: 20px;
}
li a span.icons {
font-size: 40px;
line-height: 100px;
height: 100px;
-moz-border-radius: 50px;
-webkit-border-radius: 50px;
width: 100px;
border: 1px solid rgba(0, 0, 0, 0.4);
}
}
@media only screen and (max-width: 767px) {
li {
float: none;
width: 93.75%;
margin-left: 3.125%;
margin-right: 3.125%;
margin-bottom: 3.125%;
}
li a {
margin: 0;
position: relative;
padding: 0;
}
li a span.icons {
position: absolute;
top: 10px;
left: 10px;
line-height: 50px;
font-size: 20px;
height: 50px;
-moz-border-radius: 25px;
-webkit-border-radius: 25px;
width: 50px;
border: 1px solid rgba(0, 0, 0, 0.4);
}
li a span.title {
font-size: 18px;
padding: 10px 0 10px 80px;
text-align: left;
line-height: 50px;
}
}
</style>
At the end we will have something like this. You can change fonts, colors, backgrounds and all things that you want. Enjoy it.
Out Put


Video Tutorial
Please watch this video to better understand this tutorial and don’t forget to subscribe to our channel.
Help others to find out about this article on Social Media sites. If you have any doubt or any problem, don’t hesitate to contact us. Thereafter we will be able to help you and also make sure you bookmark our site on your browser.