我正在写一个Django项目。我在应用程序主体中创建了一个静态文件夹。调整浏览器大小时,“ Te”按钮不显示菜单。这是我下载的免费模板,当我在Django项目中使用它时不起作用。
<!DOCTYPE html>
<html lang="fr" dir="ltr" class="no-js">
{% load static %}
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<title></title>
<link rel="stylesheet" type="text/css" href="{% static 'accueil/css/Styles_accueil.css' %}" />
<!-- <link rel="stylesheet" type="text/css" href="{% static 'accueil/css/bootstrap.css' %}" /> -->
<link rel="stylesheet" type="text/css" href="{% static 'accueil/css/normalize.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'accueil/css/main.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'accueil/css/font-awesome.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'accueil/css/animate.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'accueil/css/bootstrap.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'accueil/css/style.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'accueil/css/responsive.css' %}">
<script src="{% static 'accueil/js/vendor/modernizr-2.8.3.min.js' %}"></script>
<header id="home">
<!-- Main Menu Start -->
<div class="main-menu">
<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 href="#" class="navbar-brand"><img src="{% static 'accueil/img/correspondx.png' %}" /></a> -->
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li> <a href="/accueil/">Accueil</a></li>
<li> <a href="/apropos/">A propos</a></li>
<li><a href="/contacternous/">Nous contacter</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- Main Menu End -->
</header>
答案 0 :(得分:0)
您还必须在头部添加到bootstrap.js或bootstrap.min.js的链接...也将需要jQuery。
您可以下载它或使用CDN: