简体   繁体   中英

Stop select box from changing selected option color

I have a drop down that I have styled with and image. When user selects an option it turns blue. The blue color shows on top of the image which looks really ugly. How can I stop this behaviour through css?? I dont want the selected state to change color.

I want something like

select:active {
    background:transparent;
}

I am open to javascript solution too...

There is no agreed-upon, cross-browser, standards-compliant solution to styling a selected option from a select box.

Every browser handles input fields differently and that is most-true when working with select fields.

Your best bet will be to check out this question/answer: Is it possible to style a select box?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM