<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Todo_list</title> </head> <body> <div class="text" style=" text-align:center;"> <h1>todolist</h1> <ul type="none"> <div class="text" style="text-align:left;padding-left:500px;"> {% for foo in items %} <li><a href="{% url 'todo_list:todo_detail' foo.id %}">{{ foo.title}}</a></li> {% empty %} <li><a href="{% url 'todo_list:todo_add' %}">暂无待办事项</a></li> {% endfor %} </div> </ul> </div> </body>
html中整块居中,但其中条目靠左对齐
最新推荐文章于 2022-05-02 15:32:29 发布