Replace input type=file by an image

后端 未结 13 2078
感动是毒
感动是毒 2020-12-02 04:13

Like a lot of people, I\'d like to customize the ugly input type=file, and I know that it can\'t be done without some hacks and/or javascript. But,

13条回答
  •  温柔的废话
    2020-12-02 04:51

    A much better way than writing JS is to use native, and it turns to be lighter than what was suggested:

    
    

    This way the label is automatically connected to the input that is hidden. Clicking on the label is like clicking on the field.

提交回复
热议问题