Html:
<div class= "form-group" > <label class= "col-sm-3 col-sm-6 control-label" > Pictures </label> <span class= "problem-must" > </span> <div class= "col-sm-8" > <a class= "fb-upload" href= "javascript:void (0);" > <input class= "form-control" name= "pic" type= "file" accept= ". gif,.jpg,.png,.jpeg"/> < span class= "fb-img" > upload Images </span></a> </div></div>
Css:
. Form-group input[type= "file"] {cursor:pointer; opacity:0; position:absolute; Top:0;}. Fb-img {border:1px Solid #ccc; border-radius:4px; box-shadow:0 1px 1px rgba (0, 0, 0, 0.075) inset; color:gray; display:inline-block; height:34px; line-height:1.42857; PADDING:6PX 12px; text-align:left; Transition:border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s; width:100%;}
This article is from the "egg" blog, please be sure to keep this source http://yh118.blog.51cto.com/8638176/1868944
Follow the bootstrap input to modify the style of the upload upload image