I believe the front end knows, Input[type=file] Unlike other input tags, its events must be triggered on its own elements, not other elements. So you can't simply hide input and put a button up.
< a href = "javascript:;" class = "A-upload" > < input type = "File" name = "" ID = "" > </ a >
/*a upload */.a-upload { padding:4px 10px; height:20px; line-height:20px; position:relative; Cursor:pointer; Color: #888; Background: #fafafa; border:1px solid #ddd; border-radius:4px; Overflow:hidden; Display:inline-block; *display:inline; *zoom:1}. A-upload input { position:absolute; font-size:100px; right:0; top:0; opacity:0; Filter:alpha (opacity=0); Cursor:pointer}. A-upload:hover { color: #444; Background: #eee; Border-color: #ccc; Text-decoration:none}
View Code
Original source: http://qianduanblog.com/post/css-learning-3-html-input-type-file-css-beautify.html
HTML Input[type=file] CSS style beautify "go to hide"