File input 的樣式和文字的更改方法
阿新 • • 發佈:2019-02-05
<!doctype html public "-//w3c//dtd html 4.01//en" "http://www.w3.org/tr/html4/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>input type file test - zishu.cn</title> </head> <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> <body> <span id="uploadImg"> <input type="file" id="file" size="1" > <a href="#">上傳圖片</a> </span> </body> </html>