【问题标题】:bootstrap form while mobile移动时引导表单
【发布时间】:2023-03-23 09:05:01
【问题描述】:

我正在使用带有文本框内按钮的站点搜索表单。在桌面版上它可以正常工作,但是在调整到移动版时它就不行了。我正在使用一个位置:绝对;设置按钮定位,给它一个固定的位置。有什么方法可以让我在移动版本上也能做到这一点?

HTML:

    <!-- Right search form -->
    <div class="col-md-3 col-xs-12">
      <form class="form-inline" role="search">
        <div class="form-group">
          <input type="text" class="form-control search-input" size="40" placeholder="Cauta in site...">
          <input type="submit" value="" class="search-button" id="searchsubmit">
        </div>
      </form>
    </div>

CSS:

.search-button {
background: url('../images/search-btn.png') right no-repeat;
border: 0px solid black;
border-left: none;
cursor: pointer;
height: 35px;
width: 35px;
position:absolute;
left:241px;
top: 3px;
}

【问题讨论】:

    标签: html css twitter-bootstrap


    【解决方案1】:

    你可以使用引导类 reference here

     <div class="input-group">
      <span class="input-group-btn">
        <button class="btn btn-default" type="button">Go!</button>
      </span>
      <input type="text" placeholder="Cauta in site..." class="form-control">
    </div><!-- /input-group -->
    

    【讨论】:

      猜你喜欢
      • 2015-05-21
      • 2013-10-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-16
      • 2016-06-29
      相关资源
      最近更新 更多