html - 使用 input-group 和 input-group-addon Bootstrap 文本格式

标签 html css twitter-bootstrap twitter-bootstrap-3

我在这个 jsfiddle 中的代码有这个小问题.我正在使用 Bootstrap 3.2.0:bootstrap.min.jsbootstrap.min.css . jsfiddle中的代码如下:

<div class="col-lg-6">
  <div class="input-group">
    <span class="input-group-addon">
      <label>
        <input>
      </label>
    </span>
    <label type="text" class="form-control" aria-label="..." >Line 2 hello world this line needs to be very long and this should do it!</label>
  </div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
<div class="col-lg-6">
  <div class="input-group">
    <span class="input-group-addon">
      <label>
        <input>
      </label>
    </span>
    <label type="text" class="form-control" aria-label="..." >Line 2 hello world this line needs to be very long and this should do it!</label>
  </div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
<div class="col-lg-6">
  <div class="input-group">
    <span class="input-group-addon">
      <label>
        <input>
      </label>
    </span>
    <label type="text" class="form-control" aria-label="..." >Line 2 hello world this line needs to be very long and this should do it!</label>
  </div><!-- /input-group -->
</div><!-- /.col-lg-6 -->

此 HTML 适用于 bootstrap 3.0.0,但不适用于 3.2.0。所以,这是 jsfiddle 中的相同 HTML但使用 bootstrap 3.0.0。这就是我希望它看起来的样子(但我需要使用 3.2.0,因为到目前为止我已经构建了我的整个元素......)

关于导致此问题的 3.0.0 和 3.2.0 之间的区别有什么想法吗?

最佳答案

试试这个:http://jsfiddle.net/a4eocgg4/1/

这在你的 CSS 中:

 .form-control{height: auto !important; }

关于html - 使用 input-group 和 input-group-addon Bootstrap 文本格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28163118/

相关文章:

javascript - 元素轮播 Bootstrap

css - iOS 15 Safari CSS 中新的安全区域插入方法是什么?

html - 如何在具有自动高度/无文本溢出的表头中显示垂直文本?

node.js - 无法在本地主机上获取图像

javascript - 可点击的 Div - 包装 anchor 链接或使用 JS?

html - 自定义 CSS 不会覆盖 Wordpress 主题上的 Bootstrap

c# - 在 MVC 中使用 HttpPost ‘找不到资源’

android - 如何检测浏览器是否有点击高亮?

jquery - 如何在 bootstrap 中创建垂直可点击分隔线?

css - Bootstrap 列在悬停时放大(如 Netflix)