Why we can't style option of dropdown using CSS?

This question already has an answer here:

  • How to style a <select> dropdown with CSS only without JavaScript? 24 answers

  • You cannot style the option element because it is rendered by the OS, not HTML. That is why it can't be styled via CSS.

    You can of course use some plug-in that replaces select with regular HTML elements that can be styled.


    There a duplicate method for this... its correct dropdown not accept the styling so you can make the thing which look like dropdown and give styling to that thing.. Here is the link of this explaination check Answer7

    css style on select option

    链接地址: http://www.djcxy.com/p/41594.html

    上一篇: 选择框下拉式样

    下一篇: 为什么我们不能使用CSS设计下拉式选项?