gpt4 book ai didi

html - Bootstrap 表单输入标签需要内联

转载 作者:太空宇宙 更新时间:2023-11-04 11:25:45 33 4
gpt4 key购买 nike

我使用 bootstrap css 创建了一个表单,我需要标签显示在输入字段内,通常这是自动发生的,这次没有人能帮忙吗?

<style>

#form-inpt{
width: 200px;
}

</style>

<form>

<!-- Name and email -->
<label>Name</label><input id="form-inpt" class="form-control" type="text" name="name">
<label>Email Address</label><input id="form-inpt" class="form-control" type="text" name="email">

<!-- Business information -->
<label>Company Name</label><input id="form-inpt" class="form-control" type="text" name="CompanyName">
<label>Company Phone Number</label><input id="form-inpt" class="form-control" type="text" name="CompanyPhone">
<label>Address Line 1</label><input id="form-inpt" class="form-control" type="text" name="Address1">
<label>Address Line 2</label><input id="form-inpt" class="form-control" type="text" name="Address2">
<label>Address Line 3</label><input id="form-inpt" class="form-control" type="text" name="Address3">
<label>Town</label><input id="form-inpt" class="form-control" type="text" name="Town">
<label>County</label><input id="form-inpt" class="form-control" type="text" name="County">
<label>Post Code</label><input id="form-inpt" class="form-control" type="text" name="PostCode">
<label>Opening Hours</label><textarea id="form-inpt" class="form-control" name="OpeningHours"></textarea>
<label>Website</label><input id="form-inpt" class="form-control" type="text" name="Website">

<!-- Google map coordinates -->
<label>Longitude</label><input id="form-inpt" class="form-control" type="text" name="Longitude">
<label>Latitude</label><input id="form-inpt" class="form-control" type="text" name="Latitude">

<!-- Anti spam -->
<label>Anti Spam, What is 9+1?</label><input id="form-inpt" class="form-control" type="text" name="Spam">

<!-- Button -->
<label>Submit</label><input class="form-control" type="submit" value="submit" style="width: 200px;>

</form>

最佳答案

尝试使用 bootstrap div 类,例如,

<div class="row">
<div class="row">
<label Id="1">...</label><input ...../>
</div>
<div class="row">
<label Id= "2">...</label><input ...../>
</div>
.
.
.
</div>

关于html - Bootstrap 表单输入标签需要内联,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32396773/

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