gpt4 book ai didi

HTML/CSS : Bootstrap navigation bar isn't responsive

转载 作者:太空宇宙 更新时间:2023-11-04 11:30:01 25 4
gpt4 key购买 nike

我在网页顶部使用 Bootstrap 导航栏。与许多 Bootstrap 导航栏非常相似,这个特定的导航栏会在页面达到一定长度时折叠,并且所有标题都会进入页面右上角的按钮。问题是,单击按钮时,导航栏不显示标题。

这里有一个问题:特别是在这一页上,并且只有这一页,栏不起作用。事实上,该按钮似乎是灰色的。

(我会提供图片,但 Stackoverflow 不允许我放置链接,因为我是新用户)

我曾尝试用此页面替换其他页面的导航栏 - 不起作用。

我尝试用其他页面的导航栏替换此导航栏 - 效果非常好。

这让我相信这个页面上还有其他东西导致导航栏被“禁用”,或者有什么东西导致它不显示,比如缺少标签。我已经对我的代码进行了完整的搜索,但找不到它。

正如我之前所说,问题是,它只出现在一页上;没有别人。鉴于有人愿意搜索我的源代码,我在下面提供了一些源代码以查找语法错误。

另请注意,我在我的代码中包含了一个 Lightbox 照片库,并在底部放置了外部链接和脚本。

<head> <!--HEAD START-->
<meta name="description" content="Description"/>
<meta name="keyword" content="keyword"/>
<meta name="robots" content="index, follow"/>
<link rel="icon" href="img/icon.jpg"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//blueimp.github.io/Gallery/css/blueimp-gallery.min.css">
<link rel="stylesheet" href="css/stylesheet.css">
<link rel="stylesheet" href="css/lightbox.css">
<script language="JavaScript" rel="text/javascript" src="js/logic.js"></script>
<title> Title </title>
</head><!--HEAD END-->

<body><!--BODY START-->
<noscript>
Please enable JavaScript to view this page's content
</noscript>
<nav class="navbar navbar-default navbar-static-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="index.html">Navbar Title</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="index.html">Home</a></li>
<li><a href="news.html">News</a></li>
<li><a href="theassociation.html">The Association</a></li>
<li class="active"><a href="#">Photo Gallery </a></li>
<li><a href="about.html">About</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div id="container"><!--CONTAINER START-->
<div class="jumbotron"><!--JUMBOTRON START-->
<h1> Title </h1>
<h6> Lorem ipsum dolar sit amat </h6>
</div><!--JUMBOTRON END-->
</div><!--CONTAINER END-->
<hr/>
<div class="page-header" id="heading2">
<h2> Photo Gallery <br/> <small class="style"> See pictures from the 2015-2016 Season </small></h2>
</div>
<div class="container">
<hr/>
<div class="gallery">
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<a href="img/IMG_7561.jpg" class="photoData" data-title="..." data-lightbox="..."><img src="img/IMG_7561.jpg" class="img-thumbnail" width="200px"></a>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<a href="img/IMG_7561.jpg" class="photoData" data-title="..." data-lightbox="..."><img src="img/IMG_7561.jpg" class="img-thumbnail" width="200px"></a>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<a href="img/IMG_7561.jpg" class="photoData" data-title="..." data-lightbox="..."><img src="img/IMG_7561.jpg" class="img-thumbnail" width="200px"></a>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<a href="img/IMG_7561.jpg" class="photoData" data-title="..." data-lightbox="..."><img src="img/IMG_7561.jpg" class="img-thumbnail" width="200px"></a>
</div>
</div>
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<a href="img/IMG_7561.jpg" class="photoData" data-title="..." data-lightbox="..."><img src="img/IMG_7561.jpg" class="img-thumbnail" width="200px"></a>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<a href="img/IMG_7561.jpg" class="photoData" data-title="..." data-lightbox="..."><img src="img/IMG_7561.jpg" class="img-thumbnail" width="200px"></a>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<a href="img/IMG_7561.jpg" class="photoData" data-title="..." data-lightbox="..."><img src="img/IMG_7561.jpg" class="img-thumbnail" width="200px"></a>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<a href="img/IMG_7561.jpg" class="photoData" data-title="..." data-lightbox="..."><img src="img/IMG_7561.jpg" class="img-thumbnail" width="200px"></a>
</div>
</div>
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<a href="img/IMG_7561.jpg" class="photoData" data-title="..." data-lightbox="..."><img src="img/IMG_7561.jpg" class="img-thumbnail" width="200px"></a>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<a href="img/IMG_7561.jpg" class="photoData" data-title="..." data-lightbox="..."><img src="img/IMG_7561.jpg" class="img-thumbnail" width="200px"></a>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<a href="img/IMG_7561.jpg" class="photoData" data-title="..." data-lightbox="..."><img src="img/IMG_7561.jpg" class="img-thumbnail" width="200px"></a>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<a href="img/IMG_7561.jpg" class="photoData" data-title="..." data-lightbox="..."><img src="img/IMG_7561.jpg" class="img-thumbnail" width="200px"></a>
</div>
</div>
<div class="row">
<hr/>
</div>
</div>
</div>

<footer class="footer"><!--FOOTER START-->

<div class="container">
<p class="text-muted">
&copy; <script> writeDate(); </script>, All rights reserved.
</p>
</div>
</footer><!--FOOTER END-->

<!-- SCRIPTS MUST BE PLACED AT THE BOTTOM OF THE PAGE FOR PROPER EXECUTION OF ELEMENTS-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://code.jquery.com/jquery.js"></script>
<script language="JavaScript" rel="text/javascript" src="js/lightbox.js"></script>
</body><!--BODY END-->
</html>

最佳答案

我认为您缺少 Bootstrap javascript 库?

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

关于HTML/CSS : Bootstrap navigation bar isn't responsive,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32082775/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com