当前位置:编程学习 > html/css >>

html自定义input type='file'样式

方法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>

 

补充:web前端 , HTML/CSS  ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,