简体   繁体   中英

Can the css drag attribute be used to move elements around with no drop?

是否可以使用可拖动的CSS将元素从一个位置拖到另一个位置而无需放入容器部分,也不需要所有的JavaScript来做到这一点?

如果没有javascript,将无法拖动元素,您的javascript中仅需要class属性中的“ draggable”值即可指示该元素是可拖动的。

Thanks for the replies. It seems that a lot of effort went into native drag-n-drop which (i dont think) is as widely used as just dragging elements around. Since dragging stuff around is a component of drag-n-drop it seems the web guys put the cart before the horse... I would have been nice to drag stuff around without having to resort to javascript

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