我的
HTML
<div class="form-group"> <label class='control-label col-md-4' for='id_paymentCurrency'>{{'PAYMENT_CURRENCY' | translate}}</label> <div class='col-md-4'> <div id="scrollable-dropdown-menu"> <input type="text" class="form-control" data-trim-value="false" ng-trim="false" id ='id_paymentCurrency' ng-model="vm.data.paymentCurrency" typeahead-append-to-body="true" required typeahead-editable="false" uib-typeahead="currency.code for currency in vm.getCurrencies($viewValue)"ng-disabled="disabled" /> </div> </div> </div>
我的CSS
#scrollable-dropdown-menu .tt-menu { max-height: 150px; overflow-y: auto; }
我正在使用angular-x和带有angular-bootsrap的typeahead,我无法使滚动条出现.
解决方法
问题出在您的选择器上.试试这个:
#scrollable-dropdown-menu .dropdown-menu { max-height: 150px; overflow-y: auto; }
您可以在此fiddle中检查它是否按预期工作