TAG
CSS
JavaScript
Result
Run
License
<h4 class="title" draggable="true" title="드래그 후 마우스 버튼을 떼세요."> Releas the mouse button after dragging. </h4>
.title { position: relative; } .title:hover::after { content: attr(title); padding: 5px; background: #FFF; position: absolute; top: 100%; left: 50px; font-size: 14px; font-weight: lighter; }
window.addEventListener("load", () => { const elTitle = document.querySelector(".title"); elTitle.addEventListener("dragend", e => { console.log("Drag finished!"); }); });
Console
expand_less
License
License
by DevDic
Close