HOW TO CREATE ICON MENU WITHOUT IMAGE | HTML5 & CSS3

HOW TO CREATE ICON MENU WITHOUT IMAGE | HTML5 & CSS3




What is icon menu?
Icon menu is important on the modern website. Like many other websites, icon menu with 3 stripes is most popular than the other icon menu. Usually, This icon menu have some link to go to the next page or other page, but many other website is using image to create icon menu.

How to create icon menu without image?

Look at the demo below, before you create icon menu.





<br /> HOW TO CREATE ICON MENU<br />


ICON MENU

ICON MENU



Please, follow this step until the end.

1. You must create 4 div element and 4 class element on your html code.
I have 4 div element with 4 class element, that is:
menu-wrapper, row1, row2, and row3.
Example:


<div class="menu-wrapper">
<div class="row1"> </div>
<div class="row2"> </div>
<div class="row3"> </div>
</div>

2. Create a css file. Okay we start with menu-wrapper class.
Write some css property, that is: padding, line-height, background-color, border, border-radius, display, cursor, and transition-duration.

Example:

.menu-wrapper
{
padding : 2px 6px;
line-height : 1;
background-color : none;
border : 1px solid rgba(0,0,0,0);
border-radius : 1px;
display : inline-block;
cursor : pointer;
-webkit-transition : .4s;
transition : .4s;
}

3. After that, create a combinators css with a row1, row2, and row3 using child selector ( > ) .

Example:



.menu-wrapper > .row3, .menu-wrapper > .row1, .menu-wrapper > .row2


4. Next, insert some css property to create 3 stripes. That is: width, height, background-color, margin, transition-duration, and box-shadow.

Example:


.menu-wrapper > .row3, .menu-wrapper > .row1, .menu-wrapper > .row2
{
width : 35px;
height : 5px;
background-color : #26b14c;
margin : 6px 0;
-webkit-transition : .4s;
transition : .4s;
-webkit-box-shadow : 0 0 2px
rgba(0,0,0,.9);
box-shadow : 0 0 2px rgba(0,0,0,.9);
}


5. Finally, Call your css file into html. And look your HTML file. :)

What is the full code of this tutorial?
Okay, You can copy the code below for free, try it yourselft. More practice is more experience :D.


If you have any question or suggestion, please sent your question or suggestion using the form comment on this blog.

Thank you, for coming and for reading.
HAPPY READING SHOW.

What's next?
HOW TO CREATE TRANSFORMED ICON MENU TO BE "X"| HTML5, CSS3 & JAVASCRIPT

Komentar