关于file类型的input标签的使用技巧
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style>
.file-btn {
float: left;
width: 100px;
height: 50px;
border: 2px solid blanchedalmond;
background-color: antiquewhite;
margin: 0;
padding: 0;
line-height: 50px;
text-align: center;
cursor: pointer;
position: relative;
}
.file-btn input {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
opacity: 0;
cursor: pointer;
}
</style>
</head>
<body>
<div class="file-btn">上传文件
<input type="file" />
</div>
</body>
</html>
本文来自博客园,作者:觉远,转载请注明原文链接:https://www.cnblogs.com/imlaoxie/p/18603312

浙公网安备 33010602011771号