3
|
1 <!doctype html>
|
|
2 <html>
|
|
3 <head>
|
|
4 <meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5 <style>
|
|
6 @import "/site.css";
|
|
7 @import "/dad.css";
|
|
8
|
7
|
9 [drag] {
|
3
|
10 display: inline-block;
|
|
11 background-color: LightGreen;
|
|
12 padding: 8px;
|
|
13 }
|
|
14 </style>
|
|
15 <script src="/dad.js"></script>
|
|
16 <script>
|
|
17 function init() {
|
7
|
18 let drag = document.querySelector('[drag]');
|
|
19 dad.setDraggable(drag);
|
3
|
20 }
|
|
21 </script>
|
|
22 </head>
|
|
23 <body>
|
|
24 <h1>Simple</h1>
|
|
25 <p><span drag>drag me</span></p>
|
|
26 <p>bottom</p>
|
|
27 </body>
|
|
28 <script> init(); </script>
|
|
29 </html>
|