我的CSS无法正常工作,没有错误,但是却无法正常工作,我试图使很多时间失败,但是找不到任何错误,请帮助我找到此问题>>我的CSS无法正常工作,没有错误,但是它不起作用,我试图使很多时间失败,但是找不到任何错误,请帮助我找到这个问题>>我的CSS起作用了,没有错误,但是它不起作用,我试图使很多时间失败了,但是无法找不到任何问题,请帮助我找到此问题*
这是HTML5
<!DOCTYPE html>
{% load static %}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Django Level Two</title>
{# Main Css #}
<link rel="stylesheet" href="{% static "css/mystyle.css" %}" />
</head>
<body>
<h1>Hi Welcome two Django Level Two</h1>
<h2>Here are your access records:</h2>
<div class="djangotwo">
{% if access_records %}
<table>
<thead>
<th>Site Name</th>
<th>Date Accessed</th>
</thead>
{% for acc in access_records %}
<tr>
<td>{{ acc.name }}</td>
<td>{{ acc.date }}</td>
</tr>
{% endfor %}
</table>
{% else %}
<p>NO ACCESS RECORDS FOUNDS!</p>
{% endif %}
</div>
</body>
</html>
这是CSS
h1{
color: red;
}
.djangotwo{
border: 2px solid black;
}
答案 0 :(得分:0)
尝试从以下位置更改此行:
func previewController(_ controller: QLPreviewController, editingModeFor previewItem: QLPreviewItem) -> QLPreviewItemEditingMode {
return .updateContents
}
func numberOfPreviewItems(in controller: QLPreviewController) -> Int {
return 1
}
func previewController(_ controller: QLPreviewController, previewItemAt index: Int) -> QLPreviewItem {
return <URL> as QLPreviewItem
}
func previewController(_ controller: QLPreviewController, didUpdateContentsOf previewItem: QLPreviewItem) {
DispatchQueue.main.async {
<Update the pdf view to show the annotations>
}
}
至:
<link rel="stylesheet" href="{% static "css/mystyle.css" %}" />
答案 1 :(得分:0)
尝试仔细检查文件URL,也许您在目录中输入了错误的内容。
Django的文档可能有些陈旧,但是我仍然建议您将其检出,因为可能您忘记了一些东西:https://docs.djangoproject.com/en/3.0/intro/tutorial06/
从文档中,这是他们建议您设置样式表的方式:
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'polls/style.css' %}">
如果这不起作用,或者我误解了您的问题,请随时阐明问题所在:D