html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Drag & Drop</title>
<!--===========Css File ===========-->
<link rel="stylesheet" href="style.css">
</head>
<body>
<h2>Drag & Drop</h2>
<div class="container">
<div class="item"></body></div>
<div class="item">This is a text</div>
<div class="item"><p></div>
<div class="item"><body></div>
<div class="item"></p></div>
</div>
<a href="https://youtu.be/MjVrW5xsxyA">Youtube</a>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Sortable/1.15.0/Sortable.min.js" integrity="sha512-Eezs+g9Lq4TCCq0wae01s9PuNWzHYoCMkE97e2qdkYthpI0pzC3UGB03lgEHn2XM85hDOUF6qgqqszs+iXU4UA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script>
let element = document.querySelector('.container');
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
h2{
color: #29e;
font-size: 3rem;
}
.item{
width: 200px;
box-shadow: 0 0 .3rem .3rem rgba(0,0,0,0.06);
padding: 10px 20px;
margin-top: 10px;
border-radius: 6px;
cursor: pointer;
Enter to Rename, Shift+Enter to Preview
js
js
1
2
alert('Support me on YouTube [Comment, like, and share]. Thanks');
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run