我的二级栏目为什么没有显示出来呢?

来源:4-2 侧边栏导航跟随案例

慕粉2222164936

2019-03-11 12:29

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title></title>

      <style>

      *{

      margin: 0;

      padding: 0;

      }

      .page{

      width: 100%;

      height: 1035px;

      background: url(img/mo.png.jpg) center top no-repeat;

      }

      .nav{

      width: 160px;

      height: auto ;

      position: fixed;

      left: 0;

      top:50%;

      margin-top: -103px;

      font-family: "微软雅黑";

      }

      .nav-li{

      width:160px ;

      height: 40px;

      border-bottom: 1px solid #fff;

      background: #333;

      text-align: center;

      line-height: 40px;

      color: #fff;

      font-size: 16px;

     

      }

      .nav-li ul{

      width: 160px;

      height: auto;

      background: #fff;

      }

      .tit{

      width: 160px;

      height: 40px;

      }

      .nav-li ul li{

      width: 160px;

      height:40px;

      border-bottom: 1px dashed #666;

      color:#333 ;

      text-align: center;

      line-height: 40px;

     

     

      }

      </style>

</head>

<body>

<div class="page">

<div class="nav">

<div class="nav-li">

<div class="tit">慕课网的da标题</div>

   <ul>

    <li >二级栏目</li>

   </ul>

</div>

<div class="nav-li" >慕课网的标题</div>

<div class="nav-li">慕课网的标题</div>

<div class="nav-li">慕课网的标题</div>

<div class="nav-li">慕课网的标题</div>

<div class="nav-li">慕课网的标题</div>

</div>

</div>

</body>

</html>


写回答 关注

1回答

  • 慕粉2222164936
    2019-03-11 13:19:12

    已解决

css定位 position

老师带你了解CSS中定位的知识,并运用到实际案例中。

49036 学习 · 95 问题

查看课程

相似问题