<div class="card border-dark bg-white text-dark" style="width: 400px; height: auto; margin :10px auto ">
<div class="card-header">
<h3>Register to REFILM</h3>
</div>
<div class="card-body" style="height:300px">
<form action="/register" method="post">
<div class="mb-3">
<input autocomplete="off" autofocus type="text" class="form-control" name="username" placeholder="Username">
</div>
{% if username_error %}
<div class="alert alert-danger" role="alert">
{{ username_error }}
</div>
{% endif %}
<div class="mb-3">
<input type="password" class="form-control" name="password" placeholder="Password">
</div>
{% if password_error %}
<div class="alert alert-danger" role="alert">
{{ password_error }}
</div>
{% endif %}
<div class="mb-3">
<input type="password" class="form-control" name="confirmation" placeholder="Confirm password">
</div>
{% if confirmation_error %}
<div class="alert alert-danger" role="alert">
{{ confirmation_error }}
</div>
{% endif %}
<div class="col text-center">
<button type="submit" class="btn btn-primary">Register</button>
</div>
</form>
</div>
</div>
我正在使用引导程序中的卡属性创建一个注册窗口。但这很奇怪,因为卡片的高度充满了屏幕。
我已经尝试过在父标签和子标签上设置 height: auto 等设置,但它仍然是相同的。
解决方案:移除卡体标签
style="height:300px"