任意美化你的文件域input type=file兼容各浏览器
css样式:
.fileInput{width:102px;height:34px; background:url(http://funet8.com/img/20150411upFileBtn.png);overflow:hidden;position:relative;}
.upfile{position:absolute;top:-100px;}
.upFileBtn{width:102px;height:34px;opacity:0;filter:alpha(opacity=0);cursor:pointer;}
HTML代码
图片大小不超过2M,大小90*90,支持jpg、png、bmp等格式。
[runcode height="300"]
图片大小不超过2M,大小90*90,支持jpg、png、bmp等格式。
[/runcode]
原文:
http://www.cnblogs.com/dreamback/archive/2011/10/12/2208557.html