html - 字形搜索不在表单内

标签 html css twitter-bootstrap glyphicons

我希望 glyphicon-search 图标位于表单内的最右侧,但它没有出现在表单内。谁能告诉我如何做到这一点?

嗯..我们不能覆盖 glyhicon-search 类来实现目标吗?如果是,那么如何(我正在尝试这样做,但我没有达到预期的结果,尤其是在缩小网页时)?

 <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 ">
        <form class="form-inline" role="form">
             <div class="form-group has-feedback">
               <div class="row">
                <div class="col-xs-11">
                 <input type="text" class="form-control" id="inputSuccess4">
                 <span class="glyphicon glyphicon-search form-control-feedback"></span></div></div></div>
             </div>
        </form>
    </div>   
</div>

    .right-inner-addon {
        padding-top: 8px;
        padding-left:30px;

    }
    .right-inner-addon input {
        height: 30px;
        padding: 0px 10px;
    }
    .right-inner-addon i {
        position: relative;
        right: 0px;
        padding: 10px 12px;
        pointer-events: none;
    }

    .form-control{
        min-width: 400px; 
        max-width: 400px; 
        top: 7px;
}

最佳答案

将其作为背景图像应用于输入:<input type="text" class="form-control" id="inputSuccess4">或者给图标元素一个 display:block/inline-block 属性。

关于html - 字形搜索不在表单内,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23574602/

相关文章:

javascript - 如何覆盖 Twitter Bootstrap 2 中的响应功能?

javascript - 如何在函数中正确访问 DOM?

html - margin 底部不起作用

css - 如何使 CSS 属性应用于 Bootstrap 导航栏中的所有内容?

html - 在 Rails 4 中添加背景图片

html - 未排序列表的整页边框

html - 真的很奇怪 "redraw behavior"带有 anchor 链接、twitter bootstrap 固定导航栏和附加插件

javascript - 在 html 文档的所有页面中打印标题而不重叠

javascript - 网络音频 API : Clicks on volume change with slider

php - 使用 PHP smartReadFile 流式传输音频 - 不显示持续时间或在 iOS Safari 上搜索