【问题标题】:Bootstrap textarea issue in Google ChromeGoogle Chrome 中的引导文本区域问题
【发布时间】:2016-10-18 22:53:22
【问题描述】:

在 Google Chrome 中,当我使用 Bootstrap 时,textareas 无法正常工作。

例如写成:“fi”,光标永远不会在“f”和“i”之间移动。它直接从 "fi|" 传递到 "|fi"

我做了一些示例,看看行为:

  1. 使用引导程序:http://www.square-it.wtf/test-with-bootstrap
  2. 无引导:http://www.square-it.wtf/test

示例代码:

<html>
    <head>
        <title>Test</title>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
    </head>
    <body>
        <h3>Textarea behavior <mark>with</mark> bootstrap</h3>
        <textarea rows="5" cols="40">fi</textarea>
    </body>
</html>

我的 Chrome 版本 50.0.2661.102(64 位)

这似乎微不足道,但我需要一个完美的文本区域行为来实现我网站中的其他功能。

有没有办法修复它,无需更新 Chrome 版本? (我不能强迫用户使用最新的 Chrome 版本)

谢谢!

【问题讨论】:

    标签: html twitter-bootstrap google-chrome


    【解决方案1】:

    您错过了form-control 课程。看看这个:

    <textarea name="" id="input" class="form-control" rows="3" required="required"></textarea>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-01-25
      • 1970-01-01
      • 2012-12-31
      • 2014-12-29
      • 1970-01-01
      • 1970-01-01
      • 2011-08-29
      • 1970-01-01
      相关资源
      最近更新 更多