This question already has answers here:
twitter bootstrap navbar fixed top overlapping site
                                
                                    (18个回答)
                                
                        
                                3年前关闭。
            
                    
谁能告诉我为什么我的导航栏下面看不到文本。它藏起来了吗?我已将导航栏设置为固定。这是问题吗?

我正在尝试在下面添加标题,但是我什至看不到文本。

提前致谢

里斯

<!DOCTYPE html>
<html>
<head>
<!-- LINKS TO EXTERNAL FILES (BELOW) -->
<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="slyderesp.css">

    <title></title>
</head>

<body>

<!-- NAVBAR (RESPONSIVE) -->

    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">Slyde</a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
          <ul class="nav navbar-nav">
            <li class="active"><a href="#">Home</a></li>
            <li><a href="#meet">Meet The Band</a></li>
            <li><a href="#photos">Photos</a></li>
            <li><a href="#videos">Videos</a></li>
            <li><a href="#contact">Contact</a></li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </nav>

<!--HEADER (RESPONSIVE)-->

    <div>WHY CANT I SEE THIS?</div>











<!--LINK TO EXTERNAL FILES (BELOW) -->
<script type="text/javaScript" src="js/slyderesp.js"></script>
<script src="js/jquery-3.1.0.min.js"></script>
 <!-- Include all compiled plugins (below), or include individual files as needed -->
 <script src="bootstrap/js/bootstrap.min.js"></script>
</body>
</html>

最佳答案

您的导航栏具有.navbar-fixed-top类,可在浏览器窗口中对其进行修复。您的<div>就在它的下面。删除该类或为您的身体添加一些填充。

关于html - 为什么看不到任何内容? ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39412113/

10-11 02:39