Horizontal Icon Bar Using Html, CSS Only
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>icon bar</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="icon-bar">
<a class="active" href=""><i class="fa fa-home">Home</i></a>
<a href=""><i class="fa fa-search">Search</i></a>
<a href=""><i class="fa fa-globe">Global</i></a>
<a href=""><i class="fa fa-envelope">Email</i></a>
<a href=""><i class="fa fa-trash">Trash</i></a>
</div>
<div class="content">
<p>SUBSCRIBE TO MD TECH TAMIZHA</p>
<p>THANK YOU FOR WATCHING</p>
</div>
</body>
</html>
2. CSS
body{
margin: 0;
padding: 0;
background-color: silver;
}
.icon-bar{
width: 100%;
}
.icon-bar a{
float: left;
width: 20%;
text-align: center;
padding: 15px 0;
transition: all 0.3s ease;
color: white;
font-size: 30px;
background-color: black;
}
.icon-bar a:hover{
background-color: #31bdcf;
}
.icon-bar .active{
background-color: #31bdcf;
}
.icon-bar .active:hover{
background-color: black;
color: white;
}
.content{
position: absolute;
top: 40%;
left: 30%;
}
.content p{
font-size: 30px;
}
No comments:
Post a Comment