我无法弄清楚为什么下载后使用图像时搜索图标的图像没有出现在搜索框内,而直接使用链接时却出现了。有什么建议吗?图像是这样的:http://www.paulund。 co.uk/playground/demo/pretty_search_forms/images/search.png
<div class="bar navbar-inverse navbar-fixed-top">
<div class="container">
<div id="logo">
<a href="main.php">XYZ</a>
</div>
<div class="col-xs-5 right-inner-addon has-feedback">
<form class="form-inline" role="form">
<div class="form-group has-feedback">
<label class="control-label" for="inputSuccess4"></label>
<input type="text" class="form-control" id="inputSuccess4" placeholder="Search">
</div>
</form>
</div>
</div>
</div>
.right-inner-addon {
padding-top: 8px;
padding-left:30px;
}
.right-inner-addon input {
height: 30px;
padding: 0px 10px;
background-image: url('images/search.png');
background-position: 370px -10px;
background-repeat: no-repeat;
}
.form-control{
min-width: 400px;
max-width: 400px;
min-height: 29px;
top: 7px;
position: fixed;
}
将background-position
属性值更改为365px 5px
。
更新的示例-(不确定您要放置的位置-但现在至少可见)
.right-inner-addon input {
height: 30px;
padding: 0px 10px;
background-image: url('http://www.paulund.co.uk/playground/demo/pretty_search_forms/images/search.png');
background-position: 365px 5px;
background-repeat: no-repeat;
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句