修改 上传图片按钮input-file样式。。

时间:2024-01-06 14:01:20
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
.filebox {width:100px;height:40px;display:inline-block;zoom:;position:relative;}
.filebox .file {width:%;height:%;position:absolute;top:-%;left:-%;opacity:;filter:alpha(opacity:);font-size:%;cursor:pointer;}
.filebox .btn {width:%;height:40px;display:block;border:none;background-color:#f30;color:#fff;text-align:center;line-height:40px;font-size:14px;font-weight:bold;}
.filebox:hover .btn {background-color:#f60;}
</style>
</head> <body> <a class="filebox">
<input type="file" name="" id="" class="file" />
<input class="btn" type="button" value="选择图片"/>
</a> 这个是文字
</body>
</html>