css实现菜单点击弹出子菜单动画效果代码

代码语言:html

所属分类:菜单导航

代码描述:css实现菜单点击弹出子菜单动画效果代码

代码标签: css 菜单 弹出 动画

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">


    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css">


    <style>
        @import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
        
        * {
          margin: 0;
          font-family: "Poppins";
        }
        
        svg {
          position:absolute;
          height: 700px;
           left: -600px;
            top: -600px;
          display: block;
          filter: drop-shadow(10px 20px 5px #5BF5A380);
          transition: left 0.5s, top 0.5s;
        }
        
        .nav {
          overflow: hidden;
          position: relative;
          width: 100%;
        }
        
        svg.open {
          top: -280px;
          left: -250px; 
        }
        
        .nav #links {
          display: none;
        }
        
        .nav a {
          color: black;
          padding: 10px 16px;
          text-decoration: none;
          font-size: 17px;
          display: block;
          animation-name: text;
          animation-duration: 1s;
        }
        
        @keyframes text {
          0% {
            opacity: 0%;
            transform: translateX(-100px);
          }
          50% {
            opacity: 0%;
          }
          100% {
            opacity: 100%;
          }
        }
        
        .nav a:hover {
          text-decoration: underline;
        }
        
        #links a {
          padding-.........完整代码请登录后点击上方下载按钮下载查看

网友评论0