input上傳按鈕 文字修改辦法


解決思路是把input 放在文字的上邊,弄成透明的,這樣在點文字時,實際是點擊了input,這樣就實現了文件的上傳。

具體代碼:

<style>
    #uploadImg{ font-size:12px; overflow:hidden; position:absolute}
    #file{ position:absolute; z-index:100; margin-left:-180px;      font-size:60px;opacity:0;filter:alpha(opacity=0); margin-top:-5px;}
</style>
<span id="uploadImg">
<input type="file" id="file" size="1" >
<a href="#">上傳圖片</a></span>    

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM