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屋!
查看全文