How to add background image for input type=“button”?

前端 未结 5 890
醉梦人生
醉梦人生 2020-11-30 07:06

i\'ve been trying to change the background image of the input button through css, but it doesn\'t work.

search.html:


    
5条回答
  •  囚心锁ツ
    2020-11-30 07:49

    You need to type it without the word image.

    background: url('/image/btn.png') no-repeat;

    Tested both ways and this one works.

    Example:

    
        
            
        
        
            
            
            
        
    
    

提交回复
热议问题