[type="file"] { border: 0; clip: rect(0, 0, 0, 0); height: 1px; overflow: hidden; padding: 0; position: absolute !important; white-space: nowrap; width: 1px; } [type="file"] + label { /* File upload button styles */ } [type="file"]:focus + label, [type="file"] + label:hover { /* File upload hover state button styles */ } [type="file"]:focus + label { /* File upload focus state button styles */ }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter