2017-10-06 75 views
2

美好的一天!根据屏幕高度选择下拉高度

我有一个下拉选择使用“selectize”插件。 我怎么可以设置下拉内容高度的底座上的屏幕高度,因为我有我的下拉列表中的许多项目选择,这将是很好的展示他们的不仅仅是一个短更长的名单..

目前我有什么。 enter image description here

所需的输出

enter image description here

我试着用下面的代码,刚刚从玩控制台,但是,它不正常工作。

.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;*/ 

} 

请有任何建议,谢谢!

回答

1

我设法获得所需的出由

.selectize-dropdown, .selectize-dropdown.form-control{ 
    height: 90vh !important; 
} 

.selectize-dropdown-content{ 
    max-height: 100% !important; 
    height: 100% !important; 
}