css - What is the best way to replace the file browse button in html? -
i know it's possible replace browse button, generated in html, when use input
tag type="file
.
i'm not sure best way, if has experience please contribute.
the best way make file input control almost invisible (by giving low opacity - not "visibility: hidden" or "display: none") , absolutely position under - lower z-index.
this way, actual control not visible, , whatever put under show through. since control positioned above button, still capture click events (this why want use opacity, not visibility or display - browsers make element unclickable if use hide it).
this article goes in-depth on technique.
Comments
Post a Comment