html代碼:
<input type="file" id="file_btn" src="img.jpg" />
css代碼:
input[type="file"]{ /* 常規設置, 即:引入一個圖片背景,設置在中心位置,大小和按鈕的大小一致,以及鼠標指針為手型 */ width:40px; height:40px; background:url(img.jpg) no-repeat center; cursor:pointer;
/* 下面的不用多問,四句一起拷貝就可以了,大概意思就是把value值設置為0像素,也就是肉眼無法看到,但卻又是存在的(用$_POST['submit_btn'] 可以證明)*/ display:block; font-size:0; line-height:0; text-indent:-9999px;