简体   繁体   中英

show caret (cursor) when dragging div tag in droppable div

I have two divs tag, the first is draggable, the second is droppable and editable.

the snip code as below:

<div id='dragElement' draggable='true'>draggble element</div>
<div id='dropElement' droppable='true' contentEditable='true'> 
     droppble and editable element
</div>

When i drag first div into the second, i need to show caret (cursor) at the position of mouse is dragging. My output likes this: http://jsfiddle.net/huynhthinh/T2zHQ/86/

Anyone can help me.Thanks all!

When i drag first div into the second, i need to show the mouse indicator at the position of mouse is dragging.

You can achieve the same using simple css

try this code

#dragElement{
    cursor:move;
}

Demo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM