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{_x000D_
color:#2b6dad;_x000D_
cursor:pointer;_x000D_
}_x000D_
.attachFileSpan:hover{_x000D_
text-decoration: underline;_x000D_
}
_x000D_
<h3> Customized input of type file </h3>_x000D_
<input id="myInput" type="file" style="visibility:hidden"/>_x000D_
_x000D_
<span title="attach file" class="attachFileSpan" onclick="document.getElementById('myInput').click()">_x000D_
Attach file_x000D_
</span>
_x000D_