我只是搞乱了一些网络开发的东西,并且在NFL赛季即将来临,我认为制作梦幻足球网站是一个好习惯。我很早就开始了,但是我设置了一个带有bootstrap的导航栏,当我在本地运行它时它工作正常,但是当我尝试在Firebase服务器上运行它时,它根本不起作用。 这是我的代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src='https://cdn.firebase.com/js/client/2.2.1/firebase.js'></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css">
</head>
<body data-spy="scroll" data-target=".navbar" data-offset="50">
<div class="container" name="navbar-container">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Fantasy Football</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" id="leagueList">My Leagues<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">League 1</a></li>
<li><a href="#">League 2</a></li>
<li><a href="#">League 3</a></li>
</ul>
</li>
<li><a href="#">My Team</a></li>
<li><a href="#">Game Day</a></li>
<li><a href="#">Waiver Wire</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
<li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
</ul>
</div>
</div>
</nav>
</div>
</body>
</html>
&#13;
非常感谢任何帮助。谢谢。
答案 0 :(得分:1)
请你试试https版本的bootstrap.css
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css">
因为Firebase使用HTTPS来投放内容。