flask-include标签使用标签

 

[footer.html]
<footer>
    这是底部
</footer>
[header.html]
<style>
    .nav ul{
        overflow: hidden;
    }
    .nav ul li{
        float:left;
        margin:0 20px;
    }
</style>
<nav class='nav'>
    <ul>
        <li>首页</li>
        <li>课程详情</li>
        <li>视频教程</li>
        <li>关于我们</li>
    </ul>

</nav>

 

[index.html]
<body>
{% include "common/header.html" %}
<div class="content">
 中间的
</div>
{% include "common/footer.html" %}

</body>

[.py]
@app.route('/')
def hello_world():
    return render_template('index.html')

posted @ 2018-09-05 21:47  裙下的小香蕉  阅读(775)  评论(0编辑  收藏  举报