Styling an input type=“file” button

后端 未结 30 1703
终归单人心
终归单人心 2020-11-21 11:50

How do you style an input type=\"file\" button?

30条回答
  •  一整个雨季
    2020-11-21 12:03

    Here we use a span to trigger input of type file and we simply customized that span, so we can add any styling using this way.

    Note that we use input tag with visibility:hidden option and trigger it in the span.

    .attachFileSpan{
    color:#2b6dad;
    cursor:pointer;
    }
    .attachFileSpan:hover{
    text-decoration: underline;
    }

    Customized input of type file

    Attach file

    Reference

提交回复
热议问题