vue滑动式app底部导航栏效果代码

代码语言:html

所属分类:菜单导航

代码描述:vue滑动式app底部导航栏效果代码

代码标签: vue 滑动式 app 底部 导航栏

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

<!DOCTYPE html>

<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />
    <script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>



    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue@2.6.1.js"></script>

    <style>
        @import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");
        
        * {
          padding: 0;
          margin: 0;
          box-sizing: border-box;
        }
        
        :root {
          --bkg: #292c2c;
          --white: #eeeeee;
          --accent: #0cbcd3;
          --easing: 0.6s cubic-bezier(0.3, -0.01, 0.06, 1);
        }
        
        body {
          height: 100vh;
          display: grid;
          place-items: center;
          background-color: var(--bkg);
          font-family: "Poppins", sans-serif;
        }
        
        ul {
          list-style-type: none;
        }
        
        a {
          text-decoration: none;
        }
        
        .menu {
          width: 400px;
          height: 70px;
          background-color: var(--white);
          border-top-left-radius: 10px;
          border-top-right-radius: 10px;
          border-bottom-left-radius: 20px;
          border-bottom-right-radius: 20px;
        }
        .menu ul {
          width: 350px;
          margin: 0 auto;
          position: relative;
          display: grid;
          grid-template-columns: repeat(5, 1fr);
          justify-items: center;
        }
        .menu ul li {
          position: relative;
          width: 70px;
          height: 70px;
          z-index: 1;
        }
        .menu ul li a {
          height: 100%;
          display: grid;
          place-items: center;
        }
        .menu ul li a .icon {
          position: relative;
          display: block;
          line-height: 75px;
          font-size: 1.5rem;
          text-align: center;
          color: var(--bkg);
          transition: var(--easing);
        }
        .menu ul li.active a .icon {
          transform: translateY(-35px);
        }
        .menu ul li a .text {
          position: absolute;
          font-size: 0.75rem;
          color: var(--bkg);
          transition: var(--easing);
          opacity: 0;
          transform: translateY(20px);
        }
        .menu ul li.active a .text {
          opacity: 1;
          transform: translateY(14px);
        }
        
        .menu ul li:nth-child(v-bind(1)).active ~ .indicator {
          transform: translateX(calc(70px * v-bind(0)));
        }
        .menu ul li:nth-child(2).active ~ .indicator {
          transform: translateX(calc(70px * 1));
        }
        .menu ul li:nth-child(3).active ~ .indicator {
          transform: tran.........完整代码请登录后点击上方下载按钮下载查看

网友评论0