<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>拖拽</title>
<style>
*{
margin:0;padding:0;box-sizing: border-box;}
body{
font-size: 12px;position:relative;font-family: "microsoft yahei";}
#addFile{
display:block;margin:0 auto;text-align: center;color:#634A3B;cursor: pointer;}
#edit,.addImg{
position:relative;width:700px;height:320px;padding:3px;border:1px solid #d4d4d4;background: #fff;margin:50px auto 0;box-shadow:inset 0 1px 1px #d6d6d6;outline: medium;z-index:3;font-size:14px;}
#edit>p{
position:absolute;width:240px;height:50px;text-align:center;left: 0;top:0;right:0;bottom:0;margin:auto;border:1px dashed #ddd;font-size:1em;color:#999;display:block;line-height:50px;}
#control{
width:700px;margin:0 auto;height:45px;line-height:45px;background: #fff;border-width: 0 1px 1px 1px;border-style:solid;border-color:#d4d4d4;}
#control .upload{
position: relative;width:92px;height
原生 JS 写拖拽文件上传
最新推荐文章于 2024-02-28 13:49:27 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)