form 文件上传
通过form属性enctype="multipart/form-data"上传
html:
<form action="" class="" enctype="multipart/form-data" id="peo-new-form">
<div class="flex flex-pack-center">
<div class="fullPath peo-edit-fullPath ellips" id="peo-edit-fullPath"></div>
<a href="javascript:;" class="file peo-edit-file peoForm" id="peo-edit-file">选择文件
<input type="file" name="" id="editForm">
</a>
</div>
</form>
css:
对原有的文件上传进行美化
.file
position: relative;
width: 160px;
height: 56px;
line-height: 40px;
padding: 7px 10px;
text-align: center;
border-radius: 13px;
overflow: hidden;
text-indent: 0;
color: #54546C;
font-size: 30px;
background: #fff;