AnimationsButtonsTutorials

New Animated Hamburger Icons

New Animated Hamburger Icons

New Animated Hamburger Icons

Before We Start to New Animated Hamburger Icons

New Animated Hamburger Icons can be used to animate a Cards Closing Button, Menu Closing 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.

<body>
<main>
        <div class="col">
            <div class="con">
                <div class="bar top"></div>
                <div class="bar middle"></div>
                <div class="bar bottom"></div>
            </div>
        </div>
        <div class="col">
            <div class="con">
                <div class="bar arrow-top"></div>
                <div class="bar arrow-middle"></div>
                <div class="bar arrow-bottom"></div>
            </div>
        </div>

        <div class="col">
            <div class="con">
                <div class="bar arrow-top-r"></div>
                <div class="bar arrow-middle-r"></div>
                <div class="bar arrow-bottom-r"></div>
            </div>
        </div>

        <div class="col">
            <div class="special-con">
                <div class="bar arrow-top-fall"></div>
                <div class="bar arrow-middle-fall"></div>
                <div class="bar arrow-bottom-fall"></div>
            </div>
        </div>
    </main>
</body>

Step 2 – Add CSS

Copy and paste below code in your HTML editor between <style></style> tag as below.

<style>
        html,
        body {
            height: 100%;
            width: 100%;
            margin: 0;
            background: #3b7300;
        }

        main {
            position: relative;
            top: 50%;
        }

        .con,
        .special-con {
            cursor: pointer;
            display: inline-block;
        }

        .bar {
            display: block;
            height: 5px;
            width: 50px;
            background: #f7f7f7;
            margin: 10px auto;
        }

        .con {
            width: auto;
            margin: 0 auto;
            -webkit-transition: all 0.7s ease;
            -moz-transition: all 0.7s ease;
            -ms-transition: all 0.7s ease;
            -o-transition: all 0.7s ease;
            transition: all 0.7s ease;
        }

        .con:hover .bar,
        .special-con:hover .bar {
            background-color: #1a0051;
        }

        .col {
            display: inline-block;
            width: 24%;
            text-align: center;
            height: auto;
            position: relative;
        }

        .middle {
            margin: 0 auto;
        }

        .bar {
            -webkit-transition: all 0.7s ease;
            -moz-transition: all 0.7s ease;
            -ms-transition: all 0.7s ease;
            -o-transition: all 0.7s ease;
            transition: all 0.7s ease;
        }

        .con:hover .top {
            -webkit-transform: translateY(15px) rotateZ(45deg);
            -moz-transform: translateY(15px) rotateZ(45deg);
            -ms-transform: translateY(15px) rotateZ(45deg);
            -o-transform: translateY(15px) rotateZ(45deg);
            transform: translateY(15px) rotateZ(45deg);
        }

        .con:hover .bottom {
            -webkit-transform: translateY(-15px) rotateZ(-45deg);
            -moz-transform: translateY(-15px) rotateZ(-45deg);
            -ms-transform: translateY(-15px) rotateZ(-45deg);
            -o-transform: translateY(-15px) rotateZ(-45deg);
            transform: translateY(-15px) rotateZ(-45deg);
        }

        .con:hover .middle {
            width: 0;
        }

        .con:hover .arrow-top {
            -webkit-transform: rotateZ(45deg) translateY(11px);
            -moz-transform: rotateZ(45deg) translateY(11px);
            -ms-transform: rotateZ(45deg) translateY(11px);
            -o-transform: rotateZ(45deg) translateY(11px);
            transform: rotateZ(45deg) translateY(11px);
            width: 25px;
        }

        .con:hover .arrow-middle {
            -webkit-transform: translateX(-25px);
            -moz-transform: translateX(-25px);
            -ms-transform: translateX(-25px);
            -o-transform: translateX(-25px);
            transform: translateX(-25px);
        }

        .con:hover .arrow-bottom {
            -webkit-transform: rotateZ(-45deg) translateY(-11px);
            -moz-transform: rotateZ(-45deg) translateY(-11px);
            -ms-transform: rotateZ(-45deg) translateY(-11px);
            -o-transform: rotateZ(-45deg) translateY(-11px);
            transform: rotateZ(-45deg) translateY(-11px);
            width: 25px;
        }

        .con:hover .arrow-top-r {
            -webkit-transform: rotateZ(-45deg) translateY(11px);
            -moz-transform: rotateZ(-45deg) translateY(11px);
            -ms-transform: rotateZ(-45deg) translateY(11px);
            -o-transform: rotateZ(-45deg) translateY(11px);
            transform: rotateZ(-45deg) translateY(11px);
            width: 25px;
        }

        .con:hover .arrow-middle-r {
            -webkit-transform: translateX(25px);
            -moz-transform: translateX(25px);
            -ms-transform: translateX(25px);
            -o-transform: translateX(25px);
            transform: translateX(25px);
        }

        .con:hover .arrow-bottom-r {
            -webkit-transform: rotateZ(45deg) translateY(-11px);
            -moz-transform: rotateZ(45deg) translateY(-11px);
            -ms-transform: rotateZ(45deg) translateY(-11px);
            -o-transform: rotateZ(45deg) translateY(-11px);
            transform: rotateZ(45deg) translateY(-11px);
            width: 25px;
        }

        .con:hover .arrow-top-fall {
            -webkit-transform: translateY(15px);
            -moz-transform: translateY(15px);
            -ms-transform: translateY(15px);
            -o-transform: translateY(15px);
            transform: translateY(15px);
        }

        .con:hover .arrow-bottom-fall {
            -webkit-transform: translateY(-15px);
            -moz-transform: translateY(-15px);
            -ms-transform: translateY(-15px);
            -o-transform: translateY(-15px);
            transform: translateY(-15px);
        }

        .special-con {
            margin: 0 auto;
            -webkit-transition: all 0.7s ease;
            -moz-transition: all 0.7s ease;
            -ms-transition: all 0.7s ease;
            -o-transition: all 0.7s ease;
            transition: all 0.7s ease;
        }

        .special-con:hover .arrow-top-fall {
            -webkit-transition: all 0.7s ease-in-out;
            -moz-transition: all 0.7s ease-in-out;
            -ms-transition: all 0.7s ease-in-out;
            -o-transition: all 0.7s ease-in-out;
            transition: all 0.7s ease-in-out;
            -webkit-transform: translateY(15px);
            -moz-transform: translateY(15px);
            -ms-transform: translateY(15px);
            -o-transform: translateY(15px);
            transform: translateY(15px);
        }

        .arrow-bottom-fall,
        .arrow-top-fall {
            -webkit-transition: all 0.7s ease-in-out;
            -moz-transition: all 0.7s ease-in-out;
            -ms-transition: all 0.7s ease-in-out;
            -o-transition: all 0.7s ease-in-out;
            transition: all 0.7s ease-in-out;
        }

        .special-con:hover .arrow-bottom-fall {
            -webkit-transform: translateY(-15px);
            -moz-transform: translateY(-15px);
            -ms-transform: translateY(-15px);
            -o-transform: translateY(-15px);
            transform: translateY(-15px);
            -webkit-transition: all 0.7s ease-in-out;
            -moz-transition: all 0.7s ease-in-out;
            -ms-transition: all 0.7s ease-in-out;
            -o-transition: all 0.7s ease-in-out;
            transition: all 0.7s ease-in-out;
        }

        .ua {
            position: absolute;
            right: 30px;
            bottom: 20px;
            color: #6fffe9;
            font-size: 2em;
        }

        .fa {
            -webkit-transition: all 1s ease;
            -moz-transition: all 1s ease;
            -ms-transition: all 1s ease;
            -o-transition: all 1s ease;
            transition: all 1s ease;
        }

        .ua:hover .fa {
            color: #6fffe9;
            -webkit-transform: scale(1.5);
            -moz-transform: scale(1.5);
            -ms-transform: scale(1.5);
            -o-transform: scale(1.5);
            transform: scale(1.5);
            -webkit-transition: all 1s ease;
            -moz-transition: all 1s ease;
            -ms-transition: all 1s ease;
            -o-transition: all 1s ease;
            transition: all 1s ease;
        }
    </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.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button