Flask-Bootstrap custom theme

2020-07-19 21:25发布

问题:

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?

回答1:

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 %}

Check the documentation here: Adding a custom CSS file:



标签: css flask