导航栏切换按钮显示在移动设备上但不起作用。我找不到导航栏切换后无法正常工作的原因。
导航栏在bootply中工作,但它不能与php代码一起使用。文件路径设置良好,路由在线代码,它也不起作用。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; />
<title>Welcome - <?php echo $userRow['user_email']; ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<link href="../../bootstrap/css/bootstrap.css" rel="stylesheet" media="screen">
<link href="../../bootstrap/css/bootstrap-theme.css" rel="stylesheet" media="screen">
<link rel="stylesheet" href="../../bootstrap/style.css" type="text/css" />
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<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="#">RowApp</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="index.php">Inicio</a></li>
<li><a href="upload_trainer.php">Subir entreno</a></li>
<li><a href="remeros/alta_remero.php">Remeros</a></li>
<li><a href="remeros/historial_remero.php">Historial remeros</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#"><span class="glyphicon glyphicon-user"></span> <?php echo $userRow['user_name']; ?></a></li>
<li><a href="logout.php?logout"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container" style="margin-top:150px;text-align:center;font-family:Verdana, Geneva, sans-serif;font-size:35px;">
<a href="http://www.codingcage.com/">Coding Cage - Programming Blog</a><br /><br />
<p>REMEROS</p>
<?php
echo "<span style='color: blue;'>Extracción de todas las filas ...</span>";
?>
</div>
<script type="text/javascript" src="../../bootstrap/js/bootstrap.min.js"></script>
<script src="../../bootstrap/js/jquery.js" type="text/javascript"></script>
</body>
</html>
答案 0 :(得分:1)
Bootstrap的脚本应放在jQuery之后。