所以我试图使用相同的按钮来打开和关闭侧边菜单。但是,当我单击按钮时,侧面菜单没有任何反应。代码看起来应该可以工作,但我不知道为什么不可以。菜单的高度应从 0 更改为 220 像素,链接的不透明度应从 0 更改为 1,并在再次计时时从隐藏更改为可见,反之亦然。但我唯一可以开始工作的是点击汉堡动画。有什么帮助吗?<!DOCTYPE html><html><head> <meta charset="UTF-8"> <link rel="stylesheet" href="style.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>Document</title></head><nav> <section id="navbar"> <!-- Navigation Topper --> <div class="container topper-flex"> <div class="topper-content"> <i class="fas fa-phone"></i> <p class="topper-content">(354) 994-6746</p> <i class="fas fa-phone"></i> <p class="topper-content">bobbylarrys@icloud.com</p> <i class="fas fa-phone"></i> <p class="topper-content">117 Southeast 4th Ave Deerfield Beach, FL 33441</p> </div> </div> <!-- Mobile Navigation Header --> <div class="mobile-nav container"> <img id="mobile-logo-1" src="images/maple-logo.png" alt="test" height="50" width="160"> <!-- Hamburger Menu --> <div class="open-slide container"> <div id="wrapper" onclick="toggleNav()"> <div class="main-item menu "> <span class="line line01"></span> <span class="line line02"></span> <span class="line line03"></span> </div> </div> </div> </div>
添加回答
举报
0/150
提交
取消