本人在制作自己的blog时遇到了这个问题:
(blog的背景没了)
所以这是为啥啊QwQ
html代码:
{% extends "base.html" %}
{% block content %}
<link rel="stylesheet" type="text/css" href="./static/blog.css" >
{% for blog in blogs %}
<blog><p style="font-size:45px">{{ blog.title }}</p><p>by {{ blog.author }}</p><hr /><p style="font-size:25px">{{ blog.text }}</p></blog>
{% endfor %}
{% endblock %}
css代码:
blog{
margin:20px;
background-color:rgba(255,255,255,0.7);
color:rgba(0,0,0,1);
border-radius:.5rem;
box-shadow: 1px 1px 5px rgba(136,136,136,0.7);
}