为了账号安全,请及时绑定邮箱和手机立即绑定

为什么鼠标移到第二个“二级栏目”时,不会显示它的三级栏目?(复制代码可直接运行)

为什么鼠标移到第二个“二级栏目”时,不会显示它的三级栏目?(复制代码可直接运行)

SimonYangym 2018-06-14 22:44:40
<!DOCTYPE html> <html> <head>     <meta charset="UTF-8">     <title>侧边导航条跟踪</title>     <style type="text/css">     *{margin:0;padding: 0;}     .container{         width: 100%;         height: 4043px;         background: url(http://climg.mukewang.com/59c9f7ce0001839219034033.png) center top no-repeat;}         .nav{             width: 160px;             height: auto;             background: #ddd;             text-align: center;             position: fixed;             top: 50%;             margin-top: -103px;             cursor: pointer;             }         .nav-list1 li{             width: 100%;             height: auto;             line-height: 40px;             border-bottom: 1px solid #999;             list-style:none;             }         .nav-list2 li{             width: 100%;             height: 40px;             color: #fff;             }         .nav-list2{             width: 100%;             height: auto;             background: #aaa;             display: none;             position: relative;             }         .nav-list1 li:hover .nav-list2{             display: block;             }         .nav-list3{             width: 100%;             height: auto;             background: pink;             display: none;             position: absolute;             top: 0;             left: 160px;             }         .nav-list3 li{             width: 100%;             height: 40px;             color: #fff;             }         .nav-list1 li .nav-list2 li:hover .nav-list3{             display: block;             }         </style>  </head>  <body>      <div class="container">          <div class="nav">              <div class="nav-list1">                  <ul>                      <li>侧边导航条                          <div class="nav-list2">                              <ul>                                  <li>二级栏目                                      <div class="nav-list3">                                          <ul>                                              <li>三级栏目</li>                                              <li>三级栏目</li>                                              <li>三级栏目</li>                                          </ul>                                      </div>                                  </li>                                  <li>二级栏目                                      <div class="nav-list3">                                          <ul>                                              <li>三级栏目</li>                                              <li>三级栏目</li>                                              <li>三级栏目</li>                                          </ul>                                      </div>                                  </li>                                  <li>二级栏目                                      <div class="nav-list3">                                          <ul>                                              <li>三级栏目</li>                                              <li>三级栏目</li>                                              <li>三级栏目</li>                                          </ul>                                      </div>                                 </li>                             </ul>                          </div>                      </li>                      <li>侧边导航条</li>                      <li>侧边导航条</li>                      <li>侧边导航条</li>                      <li>侧边导航条</li>                  </ul>              </div>          </div>     </div> </body> </html>
查看完整描述

2 回答

?
SimonYangym

TA贡献1条经验 获得超0个赞

不是的,我试过了

查看完整回答
反对 回复 2018-06-19
?
msidolphin

TA贡献3条经验 获得超0个赞

你的三级栏目个数一样,看不出来而已吧。。。你改变一下数目试试

查看完整回答
反对 回复 2018-06-15
  • 2 回答
  • 0 关注
  • 1097 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信