Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我想知道如何在我的login.html中应用css_Css_Django_Bootstrap 4 - Fatal编程技术网

我想知道如何在我的login.html中应用css

我想知道如何在我的login.html中应用css,css,django,bootstrap-4,Css,Django,Bootstrap 4,你好,我的朋友,我在我的项目中安装了bootstrap,他工作得很好,只是我想知道如何应用这个bootstrap 使用css进行样式设置,并使其适应my login.html谢谢 {% extends 'base.html' %} {% block content %} <div class="container"> <div class ="row text-center"> <div class="col-md-6 offset-md3"> <

你好,我的朋友,我在我的项目中安装了bootstrap,他工作得很好,只是我想知道如何应用这个bootstrap
使用css进行样式设置,并使其适应my login.html谢谢

{% extends 'base.html' %}
{% block content %}
<div class="container">
<div class ="row text-center">
<div class="col-md-6 offset-md3">
   <form action="" method="Post">
    {% csrf_token %}
<div class="form-group">
<label for="username">Nom d'Utilisateur</label>
<input type="text" class="form-control" name="username"  
placeholder="Tapez le Nom d'Utilisateur">

</div>
<div class="form-group">
<label for="password">Mot de Passe</label>
<input type="password" class="form-control" name="password" 
placeholder="Mot de Passe">
</div>
<button type="submit" class="btn btn-primary">Entrer</button>
</form>
</div>
</div>
</div>
{% endblock %}
{%extends'base.html%}
{%block content%}
{%csrf_令牌%}
使用名称
路况
主菜
{%endblock%}

您必须在head部分的base.html模板中添加引导CSS文件:

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

我之所以添加它,是因为我在home.html中应用了css,但我用登录名注册了应用程序,我不知道我是如何做到的??