2017-01-30 2 views
5

enter image description here私Dropupは、このようになります - >スクロールDropupメニュー

<div class="dropup"> 
    <button class="btn btn-primary btn-raised dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> 
               {{selectList.selectedListItem}} 
     <div class="ripple-container"></div> 
    </button> 
    <div class="dropdown-menu"> 
     <a class="dropdown-item" ng-repeat="list in roleList" href="#" ng-value="list.role" name="{{list.role}}" ng-click="update(list.role, list._id)" id="{{list.role}}" ng-model="selectList" name="selectedList">{{list.role}}</a> 
    </div> 
</div> 

そして、私のようにdropupメニューにCSSを使用しています - しかし、それは動作しません>

overflow: scroll; 
max-height: 200px; 

私。 他の解決方法はありますか? - メニュー - をドロップダウンするためにこのCSSを追加した後の

更新 >

overflow: scroll; 
max-height: 200px !important; 

私のドロップダウン・メニューがscrollable-なしのように見えます>

Updated_DropUp_Image

+1

**どういう意味ですか**動作しません**? – Shubhranshu

+0

作業フィドルを追加します。 –

+0

は、Booststrapやマテリアルデザインのような自分のクラスやサードパーティのCSSクラスの 'dropdown-menu'ですか?あなたは 'max-height:200px!important'を試してみることができます – barteloma

答えて

1

を適用し、あなたの最も外側のdivのスタイル属性これは私のために働いた

<div class="dropdown-menu" style="height: 200px;overflow: auto;"> 

でこれを追加します。

0

表示のあなたのアプローチ変更する必要があります

inst EAD

<div class="dropdown-menu"> 
     <a class="dropdown-item" ng-repeat="list in roleList" href="#" ng-value="list.role" name="{{list.role}}" ng-click="update(list.role, list._id)" id="{{list.role}}" ng-model="selectList" name="selectedList">{{list.role}}</a> 
    </div> 

使用

<ul class="dropdown-menu scrollable-dropUp"> 
    <li><a class="dropdown-item" ng-repeat="list in roleList" href="#" ng-value="list.role" name="{{list.role}}" ng-click="update(list.role, list._id)" id="{{list.role}}" ng-model="selectList" name="selectedList">{{list.role}}</a></li> 
<ul> 

、その後で

.scrollable-dropUp{ 
    overflow: scroll;  /*overflow-x and overflow-y*/ 
    max-height: 200px !important; 
} 
+0

問題はまだ同じです@chaitra –

関連する問題