Many front-ends probably don’t understand how to implement HTML5 drag and drop. This article gives you some ideas. Organize and back up files for easy reference later.
First example:
index.html
XML/HTML CodeCopy content to clipboard
-
>
-
<html>
-
<head>
-
<meta charset="UTF-8">
-
<title>Dragtitle>
-
<style>
-
.box{
-
width: 400px;
-
height: 400px;
-
float: left;
-
}
-
#box1{
-
background: #CCC;
-
}
-
#box2{
-
background: #FF0;
-
}
-
style>
-
head>
-
<body>
-
<div id="box1" class="box">div>
-
<div id="box2" class="box">div>
-
<img src="http://pica.zol-img.com.cn/2016/02/1ace90ad77db716547614a18c4a9263g.jpg" alt="" id="img1" />