我一直在努力在本地网站上渲染背景图片。我正在搜索论坛,并尽我所能,但仍然发出问题。你能看看吗?
<link rel="stylesheet" type="text/css" href="{% static 'books/theme.css' %}" >
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<a class="navbar-brand" href="{% url 'books:index' %}">The Bookstore</a>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="">
<a href="{% url 'books:index' %}">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span> Books
</a>
</li>
</ul>
</div>
</div>
</nav>
</body>
和CSS:
body{
background-image: url("https://cdn.pixabay.com/photo/2016/04/15/04/02/water-1330252_1280.jpg");
}
非常感谢您的帮助!