酷炫菜单导航特效

代码语言:html

所属分类:菜单导航

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <title> -Tab Bar Animation</title>
    <link href="https://fonts.googleapis.com/css?family=Poppins:400&display=swap" rel="stylesheet">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
        /* Variables */
        /* Reset */
        *, *::after, *::before {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* Generic */
        body {
            width: 100%;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            font-family: 'Poppins', sans-serif;
            background: #004FF0;
            user-select: none;
        }

        a {
            font-size: 9px;
            font-weight: bold;
            text-decoration: none;
            color: #004FF0;
            letter-spacing: .25px;
        }

        /**/
        #active-1,
        #active-2,
        #active-3 {
            position: absolute;
            bottom: -22px;
            left: -100px;
            height: 30px;
            width: 30px;
            background: #004FF0;
            border-radius: 50%;
            transition: .5s ease-out;
        }

        #active-2 {
            transition-delay: .02s;
        }

        #active-3 {
            transition-delay: .04s;
        }

        /**/
        .menu {
            display: flex;
            align-items: center;
            position: relative;
            width: 260px;
            height: 65px;
            overflow: hidden;
            background: #ffffff;
            cursor: pointer;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
        }
        .menu__item {
            display: flex;
            justify-content: flex-start;
            flex-direction: column;
            align-items: center;
            width: 40px;
            height: 40px;
            margin: 10px;
            overflow: hidden;
        }
        .menu__c {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            flex-shrink: 0;
            height: 40px;
            width: 40px;
            border-radius: 50%;
            transform: translateY(-40px);
        }
        .menu__c:hover {
            animation: item .25s ease-in-out 1;
        }
        .menu__c--top:hover {
            animation: none;
        }
        .menu__icon {
            width: 22px;
            height: 22px;
            object-fit: contain;
        }

        /**/
        .is-c-translate {
            transform: translateY(0px);
            transition: .5s ease-in-out .35s;
        }

@keyframes item {
            0%, 100% {
                transform: translateY(-40px);
            }
            50% {
                transform: translateY(-36px);
            }
        }
    </style>

</head>
<body translate="no">
    <nav class="menu">
        <a class="menu__item" id="i-0">
            <div class="menu__c menu__c--top">
                <span class="menu__text">HOME</span><img class="menu__icon" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBB%0D%0AZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9u%0D%0AOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBT%0D%0AVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzEx%0D%0ALmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkNhcGFfMSIgeG1sbnM9Imh0dHA6Ly93d3cu%0D%0AdzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGlu%0D%0AayIgeD0iMHB4IiB5PSIwcHgiDQoJIHdpZHRoPSI0OHB4IiBoZWlnaHQ9IjQ4cHgiIHZpZXdCb3g9%0D%0AIjAgMCA0OCA0OCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgNDggNDgiIHhtbDpzcGFjZT0i%0D%0AcHJlc2VydmUiPg0KPGc+DQoJPHBhdGggaWQ9InN2Z18xIiBmaWxsPSJub25lIiBzdHJva2U9IiMw%0D%0AMDRGRjAiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMjAsNDBW%0D%0AMjhoOHYxMmgxMFYyNGg2TDI0LDZMNCwyNGg2djE2DQoJCUgyMHoiLz4NCjwvZz4NCjwvc3ZnPg0K" />
            </div>
            <div class="menu__c">
                <img class="menu__icon" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBB%0D%0AZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9u%0D%0AOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBT%0D%0AVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzEx%0D%0ALmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkNhcGFfMSIgeG1sbnM9Imh0dHA6Ly93d3cu%0D%0AdzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGlu%0D%0AayIgeD0iMHB4IiB5PSIwcHgiDQoJIHdpZHRoPSI0OHB4IiBoZWlnaHQ9IjQ4cHgiIHZpZXdCb3g9%0D%0AIjAgMCA0OCA0OCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgNDggNDgiIHhtbDpzcGFjZT0i%0D%0AcHJlc2VydmUiPg0KPGc+DQoJPHBhdGggaWQ9InN2Z18xIiBmaWxsPSJub25lIiBzdHJva2U9IiMw%0D%0AMDRGRjAiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMjAsNDBW%0D%0AMjhoOHYxMmgxMFYyNGg2TDI0LDZMNCwyNGg2djE2DQoJCUgyMHoiLz4NCjwvZz4NCjwvc3ZnPg0K" />
            </div>
        </a><a class="menu__item" id="i-1">
            <div class="menu__c menu__c--top">
                <span class="menu__text">LIKES</span><img class="menu__icon" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTg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jEsMjMuMDdMMjQsNDIuN3oiLz4NCjwvc3ZnPg0K" />
            </div>
            <div class="menu__c">
                <img class="menu__icon" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBB%0D%0AZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9u%0D%0AOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBT%0D%0AVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzEx%0D%0ALmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkNhcGFfMSIgeG1sbnM9Imh0dHA6Ly93d3cu%0D%0AdzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGlu%0D%0AayIgeD0iMHB4IiB5PSIwcHgiDQoJIHdpZHRoPSI0OHB4IiBoZWlnaHQ9IjQ4cHgiIHZpZXdCb3g9%0D%0AIjAgMCA0OCA0OCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgNDggNDgiIHhtbDpzcGFjZT0i%.........完整代码请登录后点击上方下载按钮下载查看

网友评论0