twitter-bootstrap 如何为 selectize.js jquery 插件增强的选择设置自定义高度和宽度?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22545916/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 20:20:20  来源:igfitidea点击:

How to set custom height & width for select enhanced with selectize.js jquery plugin?

csstwitter-bootstrapuser-interfacejquery-pluginsselectize.js

提问by pragmatic_programmer

I'm using https://github.com/brianreavis/selectize.jsin a project and I'm not able to customize the height and width of the select input:

我在项目中使用https://github.com/brianreavis/selectize.js,但无法自定义选择输入的高度和宽度:

The problem is aggravated because the standard select / text input (using bootstrap 2) is 30px height, and with this plug-in it grows to 37px and breaks very bad the visual of my user interface (growing all inputs to 37px is certainly not an option).

问题更加严重,因为标准的选择/文本输入(使用引导程序 2)是 30px 的高度,并且使用这个插件它会增长到 37px 并且破坏了我的用户界面的视觉效果(将所有输入增长到 37px 肯定不是选项)。

I've also included the selectize.bootstrap2.css file with no luck.

我还包括 selectize.bootstrap2.css 文件,但没有运气。

采纳答案by pragmatic_programmer

selectize.js customization for 30px height

selectize.js 自定义 30px 高度

.selectize-dropdown, .selectize-input { 
  line-height: 14px; 
}