【问题标题】:selectize dropdown height base on screen height根据屏幕高度选择下拉高度
【发布时间】:2018-03-18 16:41:14
【问题描述】:

美好的一天!

我有一个使用“选择”插件的下拉选择。 如何根据屏幕高度设置下拉内容高度,因为我的下拉选择中有很多项目,最好将它们显示在一个比一个短列表更长的列表中......

目前我所拥有的。

想要的输出

我尝试使用下面的代码,只是在控制台上玩,但它不起作用。

.selectize-dropdown, .selectize-dropdown.form-control{
        height: -webkit-fill-available !important;
        height: -moz-available !important;
        height: fill-available !important;
}

.selectize-dropdown-content{
   /* height: -webkit-fill-available !important;
        height: -moz-available !important;
        height: fill-available !important;*/

}

请有任何建议,谢谢!

【问题讨论】:

    标签: javascript jquery html css selectize.js


    【解决方案1】:

    我设法达到了

    所期望的输出
    .selectize-dropdown, .selectize-dropdown.form-control{
        height: 90vh !important;
    }
    
    .selectize-dropdown-content{
        max-height: 100% !important;
        height: 100% !important;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-02
      • 1970-01-01
      • 2014-10-11
      • 2020-09-04
      • 2020-11-22
      • 1970-01-01
      • 2014-10-18
      • 1970-01-01
      相关资源
      最近更新 更多