HTML5 知识库
Firefox 3.5 使用 HTML5 Drag and Drop
阅读:479次
评论:1条
更新时间:2011-09-15
Les Orchard,将HTML 5 drag and drop 带入了Firefox 3.5。
Demos(示例)
- Old school drag and drop
- New school drag and drop
- New school drag and drop, now with Event Delegation!
- Using drag feedback images
- Using data transfer content types
- Using drag effects
var dt = ev.originalEvent.dataTransfer; dt.setDragImage( $('#feedback_image h2')[0], 0, 0); dt.setDragImage( $('#logo')[0], 32, 32); var canvas = document.createElement("canvas"); canvas.width = canvas.height = 50; var tx = canvas.getContext("2d"); ctx.lineWidth = 8; ctx.moveTo(25,0); ctx.lineTo(50, 50); ctx.lineTo(0, 50); ctx.lineTo(25, 0); ctx.stroke(); dt.setDragImage(canvas, 25, 25);
点击查看详情: http://decafbad.com/blog/2009/07/15/html5-drag-and-drop
1 楼 whaosoft 2009-07-21 07:26