0

我正在尝试使用引导程序将按钮附加到搜索栏内, http: //imgur.com/vUhXh但它似乎不起作用。它正在 educomer.herokuapp.com 上显示,我使用的代码是

        %form.form-search
        .input-append
            %input.span3.search-query{:placeholder => "Search Food", :type => "text"}
            %button.btn{:type => "submit"}
                %span.icon-search

我尝试创建一个全新的应用程序只是为了查看我的代码是否有问题,但这不是问题

4

1 回答 1

0

你用的是什么版本的引导程序?我将以下内容添加到您的 Heroku 网站

<div class="input-prepend">
  <span class="add-on">@</span><input class="span2" id="prependedInput" size="16" type="text" placeholder="Username">
</div>
<div class="input-append">
  <input class="span2" id="appendedInput" size="16" type="text"><span class="add-on">.00</span>
</div>

它按预期显示。Bootstrap 的变更日志说“支持输入前置/附加组件中的按钮”是在 2.0.2 版中添加的。

于 2012-10-16T04:00:10.510 回答