2017-04-10 43 views
-3

我嘗試更改背景顏色但不工作。如何爲自動填充框設置背景顏色

<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

那是因爲你沒有自動完成內的任何標籤或數據,因此內<autocomplete></autocomplete>添加標籤或任何值,那麼你可以改變,看看它的背景色。

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

一個必須有50個評論的聲望。 – xyz