在Google Chrome中,当我使用bootstrap时,TextaReas无法正常工作。
如果它是为示例写的:" fi" ,则光标永远不会在" f"one_answers" i"之间进行。它直接从" FI |" 到" | fi" 。
我做了一些样本,以查看行为:
- 带有bootstrap:http://www.square-it.wtf/test-with-bootstrap
- 没有bootstrap: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版本)
谢谢!
您错过了form-control
类。看看这个:
<textarea name="" id="input" class="form-control" rows="3" required="required"></textarea>