为什么我的引导样式没有得到应用?

时间:2015-10-02 08:53:07

标签: html css twitter-bootstrap twitter-bootstrap-3

我是Flask和Bootstrap的新手并试图一起使用它们,但是当渲染html时,引导程序中的样式不会被应用,它只是简单的。具体来说,我从bootstrap的组件页面获得的“<div class="nav nav-tabs nav-justified">”没有得到应用。有人可以告诉我为什么?我现在在当地开发。我之前用于样式化的CSS文件工作正常。 提前致谢。 我的代码:

<!doctype html>
<title>My Page</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<div class=page>
  <h1>My Page</h1>
      <div class="nav nav-tabs nav-justified">
    <a href="{{ url_for('main_page') }} ">home</a>  
  {% if not session.logged_in %}
    <a href="{{ url_for('login') }}">log in</a>
  {% else %}
    <a href="{{ url_for('logout') }}">log out</a>
    <a href="{{ url_for('reminders') }}">reminders</a>
  {% endif %}
    <a href="{{ url_for('about') }}">about</a>
  </div>
  {% for message in get_flashed_messages() %}
    <div class=flash>{{ message }}</div>
  {% endfor %}
  {% block body %}{% endblock %}
</div>

1 个答案:

答案 0 :(得分:0)

您的头标记丢失了。你需要

<head>styles go here</head>

位于<!doctype html>标记下方的右上角。