Jquery Select2 4.0 Bootstrap 样式

Jquery Select2 4.0 Bootstrap Styling

我在一个项目中使用 Select2,它的样式与其他 bootstrap(ed) 组件相比非常突出。我个人喜欢 select2 的外观,但需要保持一致性。在早期版本中,我使用了 select2 boostrap css 3 from here

这在 Select2 4.0 上不起作用,有人有任何想法或提示吗?至少,我想调整一下Select2的高度。

非常感谢...

只需使用 https://select2.github.io/examples.html 中的常规 select2 并使用 !important 声明覆盖样式,例如

.select2-container .select2-selection--single {height: 50px !important;}