How to add background-image to select-box?

前端 未结 2 491
孤街浪徒
孤街浪徒 2020-12-11 13:05

I have done what is answered in this question but I haven\'t had luck so far in Google Chrome.

The code below works just fine in Firefox though:

sele         


        
2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-11 13:23

    Should be like this:

    option {
        background: transparent url(http://www.clinicalflow.com/skins/common/icons/ed_ins_img.png) no-repeat left center;
        padding-left: 20px;  
        width: 200px;
    }
    

    You were using semicolon just after the background: transparent; and after that url which is wrong.

提交回复
热议问题