Is it possible to change the appearance of <input type="file">
?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
- Adding a timeout to a render function in ReactJS
I went for this option which clarifies how to fully customize the browse button by including an handler of the uploaded file name, also customized. It adds additional fields and client-side controls on them just to show how to include the browse in a "real" form, not just a standalone.
Here's the codepen: http://codepen.io/emiemi/pen/zxNXWR
JS:
HTML:
In webkit you can try this out...
It's much better if you just use a
<label>
, hide the<input>
, and customize the label.HTML:
CSS:
You can style them, but you can't remove the elements that are already there. If you're creative, you can work with that and do something like this:
http://jsfiddle.net/zr1x1m2b/1/
I suggest you play around with this code, remove lines, add your own, do whatever until you get something that looks how you like!
Easiest way..
why not? ^_^
See the example here