참고
https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
HTML Drag and Drop API - Web APIs | MDN
HTML Drag and Drop interfaces enable applications to use drag-and-drop features in browsers.
developer.mozilla.org
https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/File_drag_and_drop
File drag and drop - Web APIs | MDN
HTML Drag and Drop interfaces enable web applications to drag and drop files on a web page. This document describes how an application can accept one or more files that are dragged from the underlying platform's file manager and dropped on a web page.
developer.mozilla.org
드래그 앤 드롭을 이용해서 버튼을 왼쪽 오른쪽으로 옮기는 코드를 작성했다.
아래는 코드 테스트
See the Pen drag and drop by 이아름 (@aahreum) on CodePen.
728x90