Answers for "can we add icon in select option"

CSS
1

how to modify select icon csshow to modify select icon css

appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 1.2rem center/.8rem 4rem;
Posted by: Guest on January-12-2022
4

how to put icons in select

<select title="Select your spell" class="selectpicker">
  <option>Select...</option>
  <option data-icon="glyphicon glyphicon-eye-open" data-subtext="petrification">Eye of Medusa</option>
  <option data-icon="glyphicon glyphicon-fire" data-subtext="area damage">Rain of Fire</option>
</select>
Posted by: Guest on May-21-2020

Code answers related to "can we add icon in select option"

Browse Popular Code Answers by Language