改变type=“file”样式

<!DOCTYPE html>
<html>

<head>
<title></title>
<style type="text/css">
.file {
position: relative;
display: inline-block;
width: 100px;
height: 50px;
border:1px solid #000;
background: url("images/product_01.jpg");
background-size: 100% 100%;
}

.file input {
position: absolute;
font-size: 100px;
right: 0;
top: 0;
opacity: 0;
bottom: 0;
}

</style>
</head>

<body>
<a href="javascript:;" class="file">
<input type="file" name="" id="">
</a>
</body>

</html>

posted @ 2017-09-29 14:01  能怎样不这样  阅读(497)  评论(0编辑  收藏  举报