拖拽旋转单个项目
我花了一整天的时间试图解决这个问题,但无济于事。我在页面上有几个可拖动的文本片段。这些文本片段也应该能够旋转。嗯,可拖动部分没问题。旋转甚至可以工作。但是,它不适用于单个项目 - 每当我旋转 1 个项目时,其中包含旋转代码的其他任何项目也会旋转。
i have spent an entire day trying to figure this out but, to no avail. i have several draggable pieces of texts on a page. these pieces of texts are also supposed to have the ability to be rotated. well, the draggable part is fine. the rotate is even working. however, it is not working for individual items - whenever i rotate 1 item, anything else w/the rotate code in it, rotates as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是您正在将
style="-webkit-transform:rotate(0deg);"
应用于类,这就是两个元素旋转的原因。因此,将样式应用于 id 而不是应用于类。
您可以这里查看
The problem is that you are applying
style="-webkit-transform: rotate(0deg);"
to the classThat's why both element rotate. So apply style to the id rather than apply to the class.
You can have a look here