Flask-Bootstrap自定义主题 [英] Flask-Bootstrap custom theme

查看:242
本文介绍了Flask-Bootstrap自定义主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用flask-bootstrap开发了一个flask应用程序。我也在使用virtualenv。在哪里可以找到要编辑以自定义颜色的样式表?还是有其他方法可以使用自定义颜色?

I made a flask app with flask-bootstrap. I am using virtualenv as well. Where would I find the stylesheet that I edit to customize the colors? Or is there another way to have custom colors?

推荐答案

将自定义颜色添加到css文件中,例如 mystyle.css ,将其放在静态文件夹下,然后将自定义的CSS文件添加到模板中。

Add you custom colors to a css file, e.g. mystyle.css, put it under the static folder, then add your custom css file to your template.

{% block styles %}
{{super()}}
  <link rel="stylesheet" href="{{url_for('.static', filename='mystyle.css')}}">
{% endblock %}

在此处查看文档:添加自定义CSS文件:

这篇关于Flask-Bootstrap自定义主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆