文件上传<input type="file">样式美化
<div class="fileInput left" style="width:102px;height:34px; background:url(http://images.cnblogs.com/cnblogs_com/dreamback/upFileBtn.png);overflow:hidden;position:relative;"> <input type="file" name="upfile" id="upfile" class="upfile" onchange="document.getElementById('upfileResult').innerHTML=this.value" style="position:absolute;top:-100px;"/> <input class="upFileBtn" type="button" value="上传图片" onclick="document.getElementById('upfile').click()" style="width:102px;height:34px;opacity:0;filter:alpha(opacity=0);cursor:pointer;" /> </div>
<span class="tip left" id="upfileResult">图片大小">图片大小不超过2M,大小90*90,支持jpg、png、bmp等格式。</span>
样式如下图:
通往牛逼的路上,在意的只有远方!