jQueryUI自动完成组合框太长 [英] jQueryUI Autocomplete ComboBox Too Long
本文介绍了jQueryUI自动完成组合框太长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的jQuery UI AutoComplete ComboBox在右侧没有滚动条,并且很不幸地变得很长,如下所示.我想限制此列表的长度-关于如何实现此目标的任何想法?谢谢!
My jQuery UI AutoComplete ComboBox doesn't have a scrollbar on the right side and gets very, unfortuantely, long as shown below. I'd like to restrain this list to a reasonable length - any thoughts on how that might be accomplished? Thanks!
推荐答案
您可以通过CSS设置高度:
You can set the height via CSS:
.ui-autocomplete {
max-height: 600px;
overflow-y: auto; /* prevent horizontal scrollbar */
overflow-x: hidden; /* add padding to account for vertical scrollbar */
z-index:1000 !important;
}
这篇关于jQueryUI自动完成组合框太长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文