2017-10-12 11 views
0

私はブートストラップ3フレームワークを使って簡単なフォームを作成しました。今度は、選択ボックスからコンボボックスのニンジンアイコン(図に示されています)のサイズを増やしたいと思います。 enter image description hereBootstrapのCombobox Carrotアイコンのサイズを変更してください

ここでは、私はこれを変更することができますどのように私のコード

<div class="col-sm-6"> 
    <select class="form-control input-lg" id=""> 
     <option>1</option> 
     <option>2</option> 
     <option>3</option> 
     <option>4</option> 
    </select> 
</div> 

のですか?

答えて

1

使用次のCSSプロパティ:

select { 
     -webkit-appearance: none; 
     -moz-appearance: none; 
     appearance: none; 
     /* Some browsers will not display the caret when using calc, so we put the fallback first */ 
     background: url("http://cdn1.iconfinder.com/data/icons/cc_mono_icon_set/blacks/16x16/br_down.png") white no-repeat 98.5% !important; /* !important used for overriding all other customisations */ 
     background: url("http://cdn1.iconfinder.com/data/icons/cc_mono_icon_set/blacks/16x16/br_down.png") white no-repeat calc(100% - 10px) !important; /* Better placement regardless of input width */ 
    } 
+0

それは女子で動作します。アイコンだけを変更したいと思っています。あなたのコードを使用している間、その灰色の境界線が透明になります。 –

+0

これで、背景のプロパティのみを使用します。 –

+0

私は試しました。それは完全な領域を埋める。選択リストのどのように返信いただきありがとうございます。私はいくつかの返事を待っています。もし私が何の反応も得なかったら、私はあなたの答えを承認するでしょう。 –

関連する問題