问题描述
我有一个Selectize.js多输入字段,该字段具有固定的高度和宽度.当我选择多个值时,该字段会将选定的值分成多行,使以前的值对用户隐藏.
I have an Selectize.js multi input field, that has a fixes height and width. When I select several values, the field places the selected values into multiple lines, making the previous values hidden to the user.
有什么办法可以强制select始终将值放置在一行中而不用换行?
Is there any way I can force selectize to always place the values in a single line without going into a new line?
推荐答案
我也遇到了这个问题,最终成为一个简单的CSS修复程序:
I too had this problem, ended up being a simple CSS fix:
<style>
.selectize-input { white-space: nowrap !important; }
</style>
这将关闭自动换行并将所有内容保持在一行中.刚刚实施,如果遇到任何问题都会调整此答案,但希望对您有所帮助.
This will turn off the wordwrap and keep everything on a single line. Just implemented and will adjust this answer if I run into anything, but hopefully it helps.
这篇关于如何将Selectize.js多个选择输入字段设置为始终为一行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!