0
bootstrap-select
で選択されたオプションの色を取得できません..これは本当にシンプルですが、私は別のものを試しましたが、それを変更する。bootstrap-select(selectpicker)の選択されたオプションの色を変更します
bootstrap-select
で選択されたオプションの色を取得できません..これは本当にシンプルですが、私は別のものを試しましたが、それを変更する。bootstrap-select(selectpicker)の選択されたオプションの色を変更します
select option[selected]{
background-color: xxx
}
あなただけのオプションは色の言葉、選択されたオプションの値が必要な場合:
$("select option:selected").css('backgroundColor');
EDITコメントあたり:
選択したオプションの背景色を取得するには$("select option:selected").val();
を
$("select option:selected").css('backgroundColor', '#FFFFFF');
OKですが、CSSで色を変更したいと思います。それは可能ですか? – CostCare
@CostCare更新を参照 –