原生 JS 写拖拽文件上传

<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title>拖拽</title> <style> *{margin:0;padding:0;box-sizing: border-box;} body{font-size: 1...
摘要由CSDN通过智能技术生成

在这里插入图片描述

<!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
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值