![这里写图片描述](https://img-blog.csdn.net/20170209172348400?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvenVuY2xl/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
【CSS】自定义上传文件按钮
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="common.css"/>
<style>
.sc{
width: 200px;
height: 73px;
line-height: 73px;
text-align: center;
background: deeppink;
border-radius: 50px;
-moz-border-radius: 50px;
-webkit-border-radius: 50px;
position: relative;
}
.mystyle{
width: 200px;
height: 73px;
position:absolute;
cursor: pointer;
outline: medium none;
filter:alpha(opacity=0);
-moz-opacity: 0;
opacity: 0;
top:0px;
left: 0;
z-index: 9999;
}
</style>
</head>
<body>
<div class="sc">上传图片
<input type="file" name="file" id="file" class="mystyle" value="" accept=""/>
</div>
</body>
</html>
<script type="text/javascript">
</script>