站内搜索:
首页 >> 前端 >> 内容
html自定义input type='file'样式

时间:2012/12/6 13:15:27

方法1:
<style>
#mybutton{
 border:1px solid #ccc;
 background:#fff;
 color:#000;
 padding:5px 15px;
}
</style><br/><br/>
<input type="file" id="file" onchange="" style="display:none"/>
<input type="button" onclick="file.click()" id="mybutton" value="浏览"/>

方法2:
<a href="javascript:file.click();" style="background:url(https://passport.csdn.net/images/btnsel.gif) no-repeat;width:120px;height:42px;display:block;">
 <input type="file" id="file" style="display:none;"/>
</a>

 

  • 上一篇:在微信公众平台前端网页上添加分享按钮
  • 下一篇:邮件列表
  • 返回顶部