P粉1565327062023-08-21 09:41:36
No, this is not possible because the styling of these elements is handled by the user's operating system. MSDN will answer your questions here:
P粉8250797982023-08-21 00:28:12
Only a few style attributes can be applied to <option>
elements.
This is because this type of element is an example of a "replacement element". They are operating system dependent and not part of HTML/browser. It cannot be styled via CSS.
There are alternative plugins/libraries that look like <select>
, but are actually made of regular HTML elements that can be styled.