我是StackOverFlow社区的新手,希望将来能够提供我自己的解决方案:-)目前,我们将非常感谢您的帮助:
这是使用Bootstrap的Wordpress页面的部分脚本(仅完成导航栏部分)。出于某种原因,除了Internet Explorer之外,它在任何浏览器上都没有正确显示。
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="Description" content="">
<meta name="Author" content="">
<link rel="icon" href="assets/img/favicon.ico">
<title>Test</title>
<!-- Bootstrap core CSS EDITED-->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<!-- FontAwsome icons -->
<link href="assets/css/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<!-- google fonts -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<!-- HTML5 shiv and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- HEADER ======== -->
<header class="site-header" role="banner">
<!-- Navbar -->
<div class="navbar-wrapper">
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<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="/"><img src="assets/img/logo.png" alt="Boostrap to Wordpress"></a>
</div><!--navbar header -->
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="/">Home</li>
<li><a href="blog.html">Blog</li>
<li><a href="resources.html">Resources</li>
<li><a href="Contact.html">Contact</li>
</ul><!-- nav
<div><!--navbar collapse -->
</div><!-- container -->
</div><!-- navbar -->
</div><!--navbar wrapper -->
</header>
<!-- Section1 ======== -->
<section>
</section>
<!-- sections missing ... -->
<!-- FOOTER ======== -->
<footer>
</footer>
<!-- BOOSTRAP CORE JAVASCRIPT =====EDITED -->
<script assets/js/jquery-2.1.4.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>
我很确定CSS和JS脚本是最新的。
答案 0 :(得分:0)
正确包含引导程序文件并检查它是否已加载并删除对jquery.js
的多个引用,并保留cdn
- https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
或您本地的任何一个引用 - {{1} }
assets/js/jquery-2.1.4.min.js