2016-12-28 93 views
0

html是使用佈局指令(layout =「row」)構建的,幷包含一個圖標和3個選擇框。我的選擇框和圖標不對齊 - 我如何水平對齊它們?如何在垂直角材料行中對齊兒童

我的代碼

<div layout="row" layout-align="start center" class="filter"> 
     <div flex="15"> 
      <i class="material-icons md-24">filter_list</i>Filter 
     </div> 
     <div> 
      <md-select ng-model="$ctrl.selectedtype1" placeholder="type1" class="md-no-underline">      
       <md-option ng-repeat="type in $ctrl.type1List" ng-value="type"> 
        {{type.value}} ({{type.id}}) 
       </md-option> 
      </md-select> 
     </div> 
     <div> 
      <md-select ng-model="$ctrl.selectedtype2" placeholder="type2" class="md-no-underline">      
       <md-option ng-repeat="type in $ctrl.type2List" ng-value="type"> 
        {{type.value}} ({{type.id}}) 
       </md-option> 
      </md-select> 
     </div> 
     <div> 
      <md-select ng-model="$ctrl.selectedtype3" placeholder="type3" class="md-no-underline">      
       <md-option ng-repeat="type in $ctrl.type3List" ng-value="type"> 
        {{type.value}} ({{type.id}}) 
       </md-option> 
      </md-select> 
     </div> 
    </div> 

...看起來是這樣的: enter image description here

+0

垂直或水平? – Sajeetharan

+0

應該是「水平」在我的問題。 –

回答

0

https://plnkr.co/edit/I8Jn4JweN0OVGBzBAwS8?p=preview

material-design-iconic-font css provides many icons. Try this plunkr: 
+0

感謝您的代碼共享。但是我正在尋找的是一種使選擇框文本與文本對齊的方式。所以在這種情況下,「過濾器」必須與選擇框中的「type1」對齊。 –