如何在select2 jquery插件中设置max-width?

时间:2014-06-05 07:49:17

标签: javascript jquery html css jquery-select2

我正在使用这个jQuery插件select2。一切正常。但是如果我选择了很多,输入类型将一直扩展到底部。如何修复高度?

这是我简单的select2实现:

$('#profit-centers-hidden-select').select2({
    width: '150px',
    height: '30px', // I tried this or max-height but no luck
    placeholder : 'Select Profit Centers'
});

Here is the screen shot, notice that it is the default behaviour of that plugin, but if there's a way to not make it expand/stretch based on the number of data added, that would be great. thanks

0 个答案:

没有答案