Mobile Icon Navigation Bar using HTML & CSS

Mobile Icon Navigation Bar using HTML & CSS

Hello developers, today in this blog you will learn to create a Mobile Icon Navigation Bar using HTML and CSS.


Navigation Bar is the most important UI element of the website for visitors or content viewers to find their required information or the page from the website. A website navigation bar is the most commonly represented as a horizontal list of links at the top of every page. The navigation bar that is specially made for the mobile is the mobile icon navigation bar. The navigation bar can be represented in the form of text or with its respective icons.

In this blog (Mobile Icon Navigation Bar), on the webpage, the icons are on the horizontal bar. The icons in the horizontal bar are Message, Subscription (bell), Home, Lock, and Profile icons. The hover animation has been used in these icons. If you hover over the icon, the particular icon will appear in orange color and there will be a white-colored little horizontal bar on top of the icon. When you click on the particular icon, the icon will pop up and there will be a little horizontal bar that is pink colored. The center of those icons is the Home icon, it is highlighted with the pink background to a particular extent by using border-radius property.

The source code of this Mobile Icon Navigation Bar using HTML & CSS is given below, if you want the source code of this program, you can copy it. You can use this Mobile Icon Navigation Bar using HTML & CSS on your projects.

Mobile Icon Navigation Bar [Source Code]

To make this website (Mobile Icon Navigation Bar), you need to create two files: an HTML file & a CSS file. First, create an HTML file with the name of index.html and remember, you have to create a file with a .html extension.

<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <title>Mobile icon navigation || Learningrobo</title> <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous"/><link rel="stylesheet" href="style.css"> </head> <body> <section class="phone"> <nav class="menu"> <ul> <li> <a href="javascript:void(0)"><i class="fas fa-comment-alt-lines"></i></a> </li> <li> <a href="javascript:void(0)"><i class="fas fa-bell"></i></a> </li> <li> <a href="javascript:void(0)" class="home"><i class="fas fa-store"></i></a> </li> <li> <a href="javascript:void(0)"><i class="fas fa-shopping-bag"></i></a> </li> <li> <a href="javascript:void(0)"><i class="fas fa-user"></i></a> </li> </ul> </nav> </section> <div class="credit">Made with <span style="color:tomato;font-size:20px;">❤</span> by <a href="https://www.learningrobo.com/">Learning Robo</a></div> </body> </html>
CSS provides style to an HTML page. To make the page attractive create a CSS file with the name style.css and, remember that you have to create a file with a .css extension.


.menu {
  width: 400px;
  background-color: #12192c;
  box-shadow: 0px -2px 15px -3px #ffa8ba;
  padding: 0px 20px;
  border-radius: 0px 0px 25px 25px;
  color:#fff
}

.menu ul {
  list-style: none;
  display: grid;
  grid-template-columns: auto auto auto auto auto;
  padding: 0;
  margin: 0;
}

.menu ul li {
  text-align: center;
  box-sizing: border-box;
}

.menu ul li a {
  display: block;
  width: 100%;
  padding: 10px 0;
  border-top: 2px solid;
  border-color: transparent;
  color: #fff;
}

.menu ul li a:hover:not(.home) {
  border-top: 2px solid #fff;
  color: #F7CE68;
}

.menu ul li a:focus:not(.home) {
  border-top: 2px solid #fc466b;
  color: #FBAB7E;
}

.menu ul li a:focus:not(.home) i {
  animation-name: pop;
  animation-duration: .5s;
}

@keyframes pop {
  0%   {transform: scale(.8);}
  50%  {transform: scale(1.2);}
  100% {transform: scale(1);}
}

.menu ul li a.home {
  color: #fff;
  background: #fc466b;
  border-radius: 20px;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #FBAB7E;
background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%);

  display: grid;
  place-items: center;
  margin: 0;
  min-height: 100vh;
}

.credit a{
  text-decoration: none;
  color: #000;
  font-weight: 800;
  }
  
  .credit {
      text-align: center;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    margin: 10px;
    color:#FFF
  }
We hope you would like this Mobile Icon Navigation Bar using HTML & CSS.

Thank you for reading our blog. If you face any problem in creating this Mobile Icon Navigation Bar using HTML & CSS, then contact us or comment us. We’ll try to provide a solution to your problem as soon as possible.

Thank you
Learning robo team

Post a Comment

Thank you
Learning robo team

Post a Comment (0)

Previous Post Next Post
Learning Robo says...
code copied
Welcome