简体   繁体   English

css drag属性可以用于无拖放移动元素吗?

[英]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 由于拖动东西是拖放的组成部分,因此似乎网络专家将购物车摆在了前面……我本来会很好地拖动东西而不必求助于javascript

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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