我如何改变我的文本是在左手和形式是在右手



我有一个文本,我喜欢它出现在我的登录页面的左手和我的登录表单是在右手。请问我怎么能改变,在引导5 ?我已经试过了,但是失败了,有没有人可以帮助我:

我的短信:

<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<h6 class="display-5 fw-bold text-primary">
Borinati is the place to gain and share knowledge.<br />
<span class="text-primary">It's a website to ask questions based on categories and connect with Professional people
around the world.
</span>
</h6>
</div>
</div>
</div>

登录表单:

<div class="container">
<div class="row justify-content-center">
<div class="col-md-6">
<form method="POST">
{% csrf_token %}
<div class="form-group">
<label style="font-family: Arial, Helvetica, sans-serif; color: dodgerblue;">Enter Username</label>
<input type="text" class="form-control" name="username">
</div>
<br>
<div class="form-group">
<label style="font-family: Arial, Helvetica, sans-serif; color: dodgerblue;">Enter Password</label>
<input type="password" class="form-control" name="password">
</div>
<br>
<a href="{% url 'register' %}" style="text-decoration: none; font-family: Arial, Helvetica, sans-serif; color: dodgerblue;">
Create An Account
</a>
<br>
<button type="submit" class="btn btn-primary">Login</button>
</form>
</div>
</div>
</div>

要达到预期的结果,您必须将所有代码放入一个容器和一行中,而不是为每个部分使用2个不同的容器和行。我们在bootstrap中有12种颜色,所以你必须将cold -md-8更改为cold -md-6或小于6。

<div class="container">
<div class="row ">
<div class="col-md-6">
<h6 class="display-5 fw-bold text-primary">
Borinati is the place to gain and share knowledge.<br />
<span class="text-primary">It's a website to ask questions based on categories and connect with Professional people
around the world.
</span>
</h6>
</div>
<div class="col-md-6">
<form method="POST">

<div class="form-group">
<label style="font-family: Arial, Helvetica, sans-serif; color: dodgerblue;">Enter Username</label>
<input type="text" class="form-control" name="username">
</div>
<br>
<div class="form-group">
<label style="font-family: Arial, Helvetica, sans-serif; color: dodgerblue;">Enter Password</label>
<input type="password" class="form-control" name="password">
</div>
<br>
<a href="{% url 'register' %}" style="text-decoration: none; font-family: Arial, Helvetica, sans-serif; color: dodgerblue;">
Create An Account
</a>
<br>
<button type="submit" class="btn btn-primary">Login</button>
</form>
</div>
</div>

相关内容

  • 没有找到相关文章

最新更新