想知道有没有人有任何关于如何增加下拉宽度的提示?
我有一行包含两列,一些javascript,当选择时,上下滑动下拉列表.我遇到的问题是,我似乎无法确定如何在选择时增加下拉宽度,理想情况是下拉列表与列大小匹配.但是发生的情况是,下拉列宽度与下拉列表中的文本大小相同,任何人都有建议如何增加下拉宽度以匹配列大小?
<div class="row question"> <div class="dropdown"> <div class="col-md-6" data-toggle="dropdown"> First column <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> <li>Insert your menus here</li> <li>Insert your menus here</li> <li>Insert your menus here</li> <li>Insert your menus here</li> <li>Insert your menus here</li> <li>Insert your menus here</li> </ul> </div> </div><!-- end of the dropdown --> <div class="dropdown"> <div class="col-md-6" data-toggle="dropdown"> second column <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> <li>Insert your menus here</li> <li>Insert your menus here</li> <li>Insert your menus here</li> <li>Insert your menus here</li> <li>Insert your menus here</li> <li>Insert your menus here</li> </ul> </div> </div> </div><!--end of the row question --> <script> // ADD SLIDEDOWN ANIMATION TO DROPDOWN // $('.dropdown').on('show.bs.dropdown',function(e){ $(this).find('.dropdown-menu').first().stop(true,true).slideDown(); }); // ADD SLIDEUP ANIMATION TO DROPDOWN // $('.dropdown').on('hide.bs.dropdown',true).slideUp(); }); </script>