2016-08-13 5 views
0

私はselect2の "text"の色を変更したいだけですが、レンダリングされません。select2の "text"プロパティにCSS構文を追加できますか?

results.push({ 
    id: item.kode_mobil, 
    text: item.tipe_mobil + " (<span style='color:red'>"+item.nomor_polisi+"</span>)", 
}); 

が、それは私の英語のため申し訳ありませんが、この
enter image description here

のように終了します。あなたのselectタグのクラス名は '.select' です

を想定CSS

を追加することができます おかげ

+0

は 'html'プロパティを使うのか? – kukkuz

+0

'結果 'とは何ですか?より多くの文脈が必要です。 – cambunctious

+0

はい、私は思います。何をすべきか? – newbie

答えて

0

その後、

.select option 
{ 
color:red 
} 
関連する問題