bootstrap 3 做页面,发现导航条的div问题。
发布于 9 年前 作者 mrlong 5413 次浏览 最后一次编辑是 8 年前 来自 问答
<html>
<head>
  <meta charset="utf-8"> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css">
  <script type="application/javascript" src="/js/jquery-2.1.3.min.js"></script>
  <script type="application/javascript" src="/bootstrap/js/bootstrap.min.js"></script>

</head>
  
<script>

</script>

<body>
  <nav class="navbar navbar-default navbar-fixed-top">
    <div class="container-fluid">
      <div class="navbar-header">
      </div>
    </div>
  </nav>
  
  <div class="container-fluid">
<h4>index</h4>     //显示不出来,nav 盖掉了。为什么会这样。难道要设置 mare-top 值吗,哪太差了。    
</div> <!-- container-fluid -->
</body>
</html>


问题: <h4>index </h4> 没有显示出来。

nav 盖掉了。为什么会这样。难道要设置 margin-top 值吗,哪太差了。

5 回复

我的 nav 是 navbar-fixed-top 。

bootstrap 文档有说的啊, 用了navbar-fixed-top, 要把body的padding-top设置70个像素

头上的空间总得留出来

头上的空间总得留出来

@scheshan 我看到了,到人moblie 内浏览器这个比例就错了。

回到顶部