Vertical Icon Menu Bar Creation Using Html, CSS Only
1.HTML
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<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">
<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-envelope">EMAIL</i></a>
<a href="#"><i class="fa fa-globe">GLOBAL</i></a>
<a href="#"><i class="fa fa-trash">TRASH</i></a>
</div>
<div class="content">
<p>SUBSCRIBE TO MD TECH TAMIZHA</p>
<p>THANKS FOR WATCHING</p>
</div>
</body>
</html>
2.CSS
body {
padding: 0;
margin:0;
background-color: silver;
}
.icon-bar {
overflow: hidden;
position: absolute;
height: 100%;
width: 150px;
}
.icon-bar a {
display: block;
text-align: center;
align-items: center;
padding: 46px 0;
transition: all 0.3s ease;
color: white;
font-size: 26px;
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;
text-align: center;
}
No comments:
Post a Comment