2017-04-10 5 views
-3

背景色を変更しようとしましたが、動作しません。あなたはオートコンプリート内の任意のラベルまたはデータを持っているので、<autocomplete></autocomplete>内のラベルまたは任意の値を追加しないので、あなたはそれの背景色を変更して見ることができているオートコンプリートボックスの背景色を設定する方法

<div class="col-xs-12 col-sm-3 padding0"> 
    <div style="margin-left: 5px;"> 
      <small style="color: White;">To</small> 
    </div> 
    <div class="form-group">          
     <autocomplete id="autocomplete" options="GetBusCities" place-holder="Enter City Name..." on-select="onSelectr" 
      display-property="Name" input-class="form-control" clear-input="false"></autocomplete> 
    </div> 
</div> 
+0

どこで背景色を変更しようとしましたか?あなたはここにそれを示していません.... – Claies

答えて

0
if you are using autocomplete you can put attributes inside these classes: 
body .ui-autocomplete { 
    /* font-family to all */ 
} 

body .ui-autocomplete .ui-menu-item .ui-corner-all { 
    /* all <a> */ 
} 

body .ui-autocomplete .ui-menu-item .ui-state-focus { 
    /* selected <a> */ 
} 

for the hover use something like this: 
.ui-menu-item .ui-menu-item-wrapper:hover 
{ 
    border: none !important; 
    background-color: #your-color; 
} 
0

それが機能しているかどうかを確認してください。 いくつかの値を追加すると、その背景色を変更して表示することができます。

+0

これはコメントではなく、答えとして投稿する必要があります。 –

+0

1コメントする評判が50でなければなりません。 – xyz

関連する問題