1 votes

How can I change the color of the option (select) hover?

By default it comes blue I want to change it to green.

 <select className='select' name="cars" id="cars">
  <option className='op'  value="volvo">Volvo</option>
  <option className='op'  value="volvo">Volvo</option>
  <option className='op'  value="volvo">Volvo</option>
</select>

In the css

 option .op:hover {
  background:green
}

0voto

Leo Points 101

Answer

At the moment this attribute is not customizable.

Example

An example of what you can do:

 select {
  background-color: yellow;
}

option {
  background-color: green;
}

option:checked {
  background-color: lime;
}
 <select className='select' name="cars" id="cars">
  <option className='op'  value="volvo">Volvo</option>
  <option className='op'  value="volvo">Volvo</option>
  <option className='op'  value="volvo">Volvo</option>
</select>

HolaDevs.com

HolaDevs is an online community of programmers and software lovers.
You can check other people responses or create a new question if you don't find a solution

Powered by:

X