我尝试使用 bootstrap-select 来实现一个下拉框,但选项没有垂直列出。以前有人遇到过同样的问题吗?
<script src="{% static 'risk_parity/js/jquery-3.2.1.min.js' %}"></script>
<script src="{% static 'risk_parity/js/bootstrap.min.js' %}"></script>
<link href="{% static 'risk_parity/css/bootstrap.min.css' %}" rel="stylesheet">
<script type="text/javascript" charset="utf8" src="//code.jquery.com/jquery-1.12.4.js"></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.15/js/dataTables.bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/css/bootstrap-select.min.css">
<script type="text/javascript" charset="utf8" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/js/bootstrap-select.min.js"></script>
<select class="selectpicker" >
<option>USA</option>
<option>CA</option>
</select>
<script>
$(document).ready(function(){
$('.selectpicker').selectpicker();
});
</script>