如何防止文本输入分成多行

时间:2021-05-24 21:37:31

Can't fix a tweeter bootstrap typeahed's height. I've been trying to give the outer div a fixed width and overflow:hidden; - doesn't seem to help. The input field gets bigger as I type in more text it can't fit, instead of just naturally moving the caret. I'm using Chrome.

无法修复高音引导程序类型的高度。我一直试图给外部div一个固定的宽度和溢出:隐藏; - 似乎没有帮助。当输入更多不适合的文本时,输入字段会变大,而不是仅仅自然地移动插入符号。我正在使用Chrome。

The outer div's css is split up into multiple places, if you could just give some clues would be really great. This is driving me crazy already.

外部div的css被分成多个位置,如果你能给出一些线索真的很棒。这让我疯狂了。

如何防止文本输入分成多行

如何防止文本输入分成多行

<div class="input-group">
<input type="text" class="form-control" autocomplete="off" data-role="tagsinput" id="searchBox"/>

1 个解决方案

#1


1  

To prevent the line from from breaking into additional lines, try adding:

要防止该行破坏其他行,请尝试添加:

input {
white-space: nowrap;
}

#1


1  

To prevent the line from from breaking into additional lines, try adding:

要防止该行破坏其他行,请尝试添加:

input {
white-space: nowrap;
}