gpt4 book ai didi

html - 表单输入外的 Ghlyphicons 和删除表单背景

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

我在 bootstrap 中有一个表单,我在输入中添加了字形,但字形出现在输入之外,我尝试应用类似问题的解决方案,但在我这样做之后,字形消失了。

我在页面上还有一个漂亮的全屏图像,但是当我添加表单时,它的白色背景覆盖了表单所在的图像部分。我曾尝试寻找解决方案,但我找不到任何东西,请帮忙。

<style>
body {
margin-top: 50px; /* Required margin for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */
}

input.transparent-input{
background-color:transparent !important;
border:none !important;
}

form, label, p, h3 {
color: white !important;
}

.full {
background:url(../images/holiday_resort3-1920x1080.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
}

</style>

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
</div>
</nav>

<form class="form-horizontal">
<fieldset>

<!-- Form Name -->
<legend>Book A Hotel...</legend>

<!-- Search input-->
<div class="form-group">
<label class="col-md-4 control-label" for="searchinput">Search</label>
<div class="col-md-4">
<input id="searchinput" name="searchinput" type="search" placeholder="" class="form-control input-md">
<span class="input-group-addon"><i class="glyphicon glyphicon-search"></i></span>
</div>
</div>

<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="checkindate">Check-in:</label>
<div class="col-md-2">
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
<input id="checkindate" name="checkindate" type="text" placeholder="" class="form-control input-md">
</div>
</div>

</fieldset>
</form>

<!-- jQuery -->
<script src="js/jquery.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>

This is what the page looks like

I would like something along these lines instead

最佳答案

您必须在输入和图标的父级 div 中添加类 .input-group

html代码变成这样:

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
</div>
</nav>

<form class="form-horizontal">
<fieldset>

<!-- Form Name -->
<legend>Book A Hotel...</legend>

<!-- Search input-->
<div class="form-group">
<label class="col-md-4 control-label" for="searchinput">Search</label>

<div class="input-group col-md-4">

<input id="searchinput" name="searchinput" type="search" placeholder="" class="form-control input-md">
<span class="input-group-addon"><i class="glyphicon glyphicon-search"></i></span>
</div>
</div>


<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="checkindate">Check-in:</label>
<div class="input-group col-md-2">
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
<input id="checkindate" name="checkindate" type="text" placeholder="" class="form-control input-md">

</div>
</div>



</fieldset>
</form>

Working demo

关于html - 表单输入外的 Ghlyphicons 和删除表单背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40818327/

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