Background Image for Select (dropdown) does not work in Chrome

后端 未结 4 1701
长情又很酷
长情又很酷 2020-11-27 03:45

I want to use an image for the background of a select/dropdown. The following CSS works fine in Firefox and IE, but does not in Chrome:

#main .drop-down-loc          


        
4条回答
  •  温柔的废话
    2020-11-27 03:56

    Generally, it's considered a bad practice to style standard form controls because the output looks so different on each browser. See: http://www.456bereastreet.com/lab/styling-form-controls-revisited/select-single/ for some rendered examples.

    That being said, I've had some luck making the background color an RGBA value:

    
    
      
        
      
      
        
                            
        
    提交评论

提交回复
热议问题