0
我是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>
先添加适当的标记。像'
..',并把'link href ='''放在'head tag'里面。在你的引导样式表中加入'type ='text/css''。 – CodeRomeos您需要'
...'标签。 – Adi