赞
踩
<head>
.....
<link rel="stylesheet" href="{% static 'bootstrap-3.3.7/css/bootstrap.min.css' %}">
<script type="text/javascript" src="{% static 'bootstrap-3.3.7/js/bootstrap.min.js' %}"></script>
</head>
{# 针对IE浏览器进行设置,使用最新的内核 #}
<meta http-equiv="X-UA-Compatible" content="IE=edge">
{# 根据不同的屏幕, 响应不同的布局 #}
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="{% static 'jquery-1.12.4.min.js' %}"></script>
<div class="navbar navbar-default"></div>
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="{% url 'home' %}">个人博客网站</a>
</div>
</div>
</div>
<body>
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="{% url 'home' %}">个人博客网站</a>
</div>
<ul class="nav navbar-nav">
<li><a href="{% url 'home' %}">首页</a></li>
<li><a href="{% url 'blog_list' %}">博客</a></li>
</ul>
</div>
</div>
{% block content %}{% endblock %}
</body>
<div class="navbar-header"> <a class="navbar-brand" href="{% url 'home' %}">个人博客网站</a> <button class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div id="navbar-collapse" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="{% url 'home' %}">首页</a> </li> <li><a href="{% url 'blog_list' %}">博客</a> </li> </ul> </div>
<li class='{% block nav_home_active %}{% endblock %}'>
<a href="{% url 'home' %}">首页</a>
</li>
<li class='{% block nav_blog_active %}{% endblock %}'>
<a href="{% url 'blog_list' %}">博客</a>
</li>
接下来就是填空
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
body {
margin-top: 70px!important;
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。