jquery - 如何设计 jQuery 可拖动克隆的样式?

标签 jquery jquery-ui

如何使用 CSS 设计 jQuery 可拖动克隆的样式?

最佳答案

请参阅 tohster 的第二个答案 - 这已经过时了。

=======

http://webdevel.blogspot.com/2008/09/jquery-ui-draggables-helper-css-class.html这可能会有帮助

引自上述网站:

While working with jQuery UI draggables, I have noticed that there does not seem to be a class associated with the draggable helper, and so it is styled in the same way as the draggable you selected. As a result you have to resort to the start function option to add the class dynamically:

$(".dragme").draggable({helper: "clone",
 start: function(e, ui)
 {
  $(ui.helper).addClass("ui-draggable-helper");
 }
});

As a result you have to resort to the start function option to add the class dynamically:

.ui-draggable-helper {
 border: 1px dotted #000;
 padding: 6px;
 background: #fff;
 font-size: 1.2em;
}

关于jquery - 如何设计 jQuery 可拖动克隆的样式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6489794/

相关文章:

javascript - Ajax回调仅适用于jquery表单组列表中的顶部div

javascript - 如何设置 Bootstrap 行

jquery - 如何处理所有浏览器中的就绪事件和页面显示事件,以在按下后退按钮时提供帮助

jquery - 在 HTML、CSS 中复制设计模式?

jquery - 自定义 jQuery 插件的问题

javascript - Django 表单上的 jQuery 验证插件

javascript - jQuery:如何在创建时自动将元素转换为 UI 小部件?

jquery - 如何解决无法读取未定义的属性 'timepicker' 错误

javascript - 我如何在 Typescript 中进行自动完成?有 jquery.d.ts & jquery.autocomplete.d.ts 文件

javascript - CSS 并没有通过在 HTML 中调用 JS 来改变