gpt4 book ai didi

html - 如何在表格的行之间插入间隙?

转载 作者:行者123 更新时间:2023-11-28 16:28:52 25 4
gpt4 key购买 nike

我想在输入表单中的输入框之间添加间隙。它们挤在一起,看起来不太好。这样输入表单看起来和感觉起来都不错...表单是从 views.py 传递的对象....

创建客户.html

 {% extends 'customer/base.html' %}
{% block title %}Create Customer{% endblock %}

{% block body %}
<div class="container-fluid" style="background-color: #f2f2f2; width:100%; height:135%;" >
<div class="row ">
<div class="col-lg-4"></div>
<div class="col-lg-8 text-left" align="center">
<h2>Create a Customer</h2>
<form action="." method="post">
<div class="form-group" >
{% csrf_token %}
<table>
<tr style="width:100%;" class="highlight">
<td>First Name:</td>
<td>{{form.fname}}</td>
</tr>
<tr>
<td>Last Name:</td>
<td>{{form.lname}}</td>
</tr>
<tr>
<td>Email:</td>
<td>{{form.email}}</td>
</tr>
<tr>
<td>Address:</td>
<td>{{form.address}}</td>
</tr>
<tr>
<td>City:</td>
<td>{{form.city}}</td>
</tr>
<tr>
<td>State:</td>
<td>{{form.state}}</td>
</tr>
<tr>
<td>Zip:</td>
<td>{{form.zip}}</td>
</tr>
<tr>
<td>Username:</td>
<td>{{form.uname}}</td>
</tr>
<tr>
<td>Phone:</td>
<td>{{form.phone}}</td>
</tr>
</table>
<div style="margin-left:200px; margin-top:20px;margin-bottom:20px">
<input type="submit" class="btn btn-success" value="Submit">
</div></div>
</form>
</div>
</div>
</div>
{%endblock%}

最佳答案

你可以试试css:

table tr {
margin-bottom: 10px;
display: table;
}

关于html - 如何在表格的行之间插入间隙?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39976505/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com