CNode

bootstrap 3 做页面,发现导航条的div问题。

问答
Mmrlong发布于11 年前最后回复11 年前5 回复6152 浏览0 收藏
<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)

M
mrlong#1·11 年前

我的 nav 是 navbar-fixed-top 。

S
scheshan#2·11 年前

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

L
leapon#3·11 年前

头上的空间总得留出来

X
XadillaX#4·11 年前

头上的空间总得留出来

M
mrlong#5·11 年前
引用 scheshanbootstrap 文档有说的啊, 用了navbar fixed top, 要把body的padding top设置70个像素

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

参与回复
登录后即可参与回复。登录